Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: SyncMLClient.h
Link against: smlclient.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class RSyncMLConnection

class RSyncMLConnection : public RSubSessionBase;

Description

Handle to data defining a connection to a remote SyncML server in the context of a profile.

Derivation

Members

Defined in RSyncMLConnection:
Close(), CreateL(), GetPropertyL(), Identifier(), IsReadOnly(), OpenL(), Priority(), Profile(), RSyncMLConnection(), RetryCount(), ServerURI(), SetPriority(), SetPropertyL(), SetRetryCount(), SetServerURIL(), UpdateL()

Inherited from RSubSessionBase:
CloseSubSession(), CreateAutoCloseSubSession(), CreateSubSession(), Send(), SendReceive(), Session(), SubSessionHandle()


Construction and destruction


RSyncMLConnection()

IMPORT_C RSyncMLConnection();

Description

Default constructor.

[Top]


Member functions


CreateL()

IMPORT_C void CreateL(RSyncMLProfileBase &, TSmlTransportId);

Description

Creates a new, blank, connection in the specified profile and opens this object as a handle to it.

The parent profile must be open for read/write access. The new connection is not saved until RSyncMLProfile::UpdateL() is called on the parent profile.

Parameters

RSyncMLProfileBase &

An open profile handle.

TSmlTransportId

The transport ID of this connection.

Leave codes

SyncMLError::KErrTransportNotFound

The specified transport ID does not represent a valid transport.

SyncMLError::KErrProfileAccessDenied

The parent profile is not open for edit.

KErrNoMemory

Insufficient system memory to complete the operation.

KErrAlreadyExists

A connection over the specified transport already exists within the parent profile.

System

error codes.


OpenL()

IMPORT_C void OpenL(RSyncMLProfileBase &, TSmlConnectionId);

Description

Opens a handle to an existing connection of the specified ID within the specified profile.

The access mode (read or read/write) is inherited from the parent profile.

Parameters

RSyncMLProfileBase &

An open profile handle.

TSmlConnectionId

The connection ID to open.

Leave codes

SyncMLError::KErrConnectionNotFound

The specified ID does not represent an existing connection.

SyncMLError::KErrTransportNotFound

The specified transport ID does not represent a valid transport.

KErrNoMemory

Insufficient system memory to complete the operation.

System

error codes.


Identifier()

IMPORT_C TSmlConnectionId Identifier() const;

Pre-Condition

The handle is open.

Description

Gets the ID of the connection referenced by this handle.

Return value

TSmlConnectionId

The connection ID.


Profile()

IMPORT_C TSmlProfileId Profile() const;

Pre-Condition

The handle is open.

Description

Gets the ID of the parent profile of this connection.

Return value

TSmlProfileId

The profile ID.


Priority()

IMPORT_C TUint Priority() const;

Pre-Condition

The handle is open.

Description

Gets the relative priority of this connection within the profile.

Return value

TUint

The priority.


RetryCount()

IMPORT_C TUint RetryCount() const;

Pre-Condition

The handle is open.

Description

Gets the retry count to use with the transport connection that this handle represents.

Return value

TUint

The number of times to retry the connection.


ServerURI()

IMPORT_C const TDesC8 &ServerURI() const;

Pre-Condition

The handle is open.

Description

Gets the URI of the server for the transport connection that this handle represents.

Return value

const TDesC8 &

The server address.


GetPropertyL()

IMPORT_C const TDesC8 &GetPropertyL(const TDesC8 &aName) const;

Pre-Condition

The handle is open.

Description

Gets the value of the transport property specified.

Parameters

const TDesC8 &aName

The property name.

Return value

const TDesC8 &

The transport property value. An empty descriptor if no value has been set.

Leave codes

KErrNotSupported

The specified property is not supported by the transport.


SetPriority()

IMPORT_C void SetPriority(TUint);

Pre-Condition

The handle is open.

Description

Sets the relative priority of this connection within the profile.

This is used to determine the default connection for the profile.

Parameters

TUint

The priority, where higher numbers are preferred to lower ones.


SetRetryCount()

IMPORT_C void SetRetryCount(TUint);

Pre-Condition

The handle is open.

Description

Sets the retry count for this connection..

Parameters

TUint

Number of retries


SetServerURIL()

IMPORT_C void SetServerURIL(const TDesC8 &);

Pre-Condition

The handle is open.

Description

Sets the server URI to use with this connection.

Parameters

const TDesC8 &

The server address.

Leave codes

KErrNoMemory

Insufficient system memory to complete the operation.


SetPropertyL()

IMPORT_C void SetPropertyL(const TDesC8 &aName, const TDesC8 &aValue);

Pre-Condition

The handle is open.

Description

Sets the value of a transport property to use with this connection.

Parameters

const TDesC8 &aName

The name of the transport property to set.

const TDesC8 &aValue

The value to give the transport property.

Leave codes

KErrNoMemory

Insufficient system memory to complete the operation.

KErrNotSupported

The specified property is not supported by the transport.

KErrNoMemory

Insufficient memory to store the new value.


IsReadOnly()

IMPORT_C TBool IsReadOnly() const;

Pre-Condition

The handle is open.

Description

Tests if the parent profile is open for read and write access.

Return value

TBool

True if the parent profile is open for read-only access, false if it is open for read and write access.


UpdateL()

IMPORT_C void UpdateL();

Pre-Condition

The handle is open for read and write access.

Description

Transfers any changes made to the connection data to the Sync Agent.

The new data will be persisted when RSyncMLProfile::UpdateL() is called on the parent profile.

Leave codes

KErrNoMemory

Insufficient system memory to complete the operation.

System

error codes.


Close()

IMPORT_C void Close();

Description

Closes this handle.