Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <SyncMLClient.h>
Link against: smlclient.lib
This item is not part of the S60 5th Edition SDK

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:

Inherited from RSubSessionBase:


Construction and destruction


RSyncMLConnection()

IMPORT_C RSyncMLConnection();

Description

Default constructor.

[Top]


Member functions


CreateL(RSyncMLProfileBase &,TSmlTransportId)

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(RSyncMLProfileBase &,TSmlConnectionId)

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()const

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()const

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()const

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()const

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()const

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(const TDesC8 &)const

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(TUint)

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.

Leave codes

SyncMLError::KErrProfileAccessDenied

Profile is locked


SetRetryCount(TUint)

IMPORT_C void SetRetryCount(TUint);

Pre-Condition

The handle is open.

Description

Sets the retry count for this connection..

Parameters

TUint

Number of retries

Leave codes

SyncMLError::KErrProfileAccessDenied

Profile is locked


SetServerURIL(const TDesC8 &)

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. SyncMLError::KErrProfileAccessDenied Profile is locked


SetPropertyL(const TDesC8 &,const TDesC8 &)

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

KErrNotSupported

The specified property is not supported by the transport.

KErrNoMemory

Insufficient memory to store the new value.

SyncMLError::KErrProfileAccessDenied

Profile is locked


IsReadOnly()const

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.

SyncMLError::KErrProfileAccessDenied

Profile is locked

System

error codes.


Close()

IMPORT_C void Close();

Description

Closes this handle.