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 RSyncMLSession

class RSyncMLSession : public RSessionBase;

Description

A client handle to a SyncML Sync Agent session.

An instance of this class must be created in order to instantiate any of the other client-side classes.

Accessor methods are provided to enable clients to retrieve identifiers of current and queued jobs, and of available profiles, transports, and data providers. These IDs can be used to open handles on these objects in order to manipulate them.

Clients can request notifications of events related to jobs, profiles, transports, and the SyncML Agent, and can request progress for the currently running job.

Derivation

Members

Defined in RSyncMLSession:
CancelEvent(), CancelProgress(), Close(), CurrentJobL(), DeleteProfileL(), ListDataProvidersL(), ListProfilesL(), ListQueuedJobsL(), ListTransportsL(), OpenL(), RSyncMLSession(), RequestEventL(), RequestProgressL()

Inherited from RHandleBase:
Attributes(), Duplicate(), FullName(), Handle(), HandleInfo(), Name(), SetHandle(), SetHandleNC(), iHandle

Inherited from RSessionBase:
CreateSession(), EAutoAttach, EExplicitAttach, Open(), Send(), SendReceive(), SetReturnedHandle(), ShareAuto(), ShareProtected(), TAttachMode


Construction and destruction


RSyncMLSession()

IMPORT_C RSyncMLSession();

Description

Default constructor.

[Top]


Member functions


OpenL()

IMPORT_C void OpenL();

Description

Opens a new session with the SyncML Sync Agent.

Leave codes

System

error codes.


RequestEventL()

IMPORT_C void RequestEventL(MSyncMLEventObserver &);

Pre-Condition

The session is open.

Description

Requests notification of session events.

Events will continue to be delivered to the supplied observer until the session is closed or CancelEvent() is called.

Parameters

MSyncMLEventObserver &

The observer to which to deliver events.

Leave codes

KErrNoMemory

Insufficient system memory.


CancelEvent()

IMPORT_C void CancelEvent();

Pre-Condition

The session is open.

Description

Cancels an outstanding session event request.


RequestProgressL()

IMPORT_C void RequestProgressL(MSyncMLProgressObserver &);

Pre-Condition

The session is open.

Description

Requests notification of progress events from data synchronisation and device management jobs.

There need not be a job in progress when this method is called, but no events are received until a job is running.

Parameters

MSyncMLProgressObserver &

The observer to which to deliver events.

Leave codes

KErrNoMemory

Insufficient system memory.


CancelProgress()

IMPORT_C void CancelProgress();

Description

Cancels an outstanding request for progress events.


CurrentJobL()

IMPORT_C void CurrentJobL(TSmlJobId &, TSmlUsageType &) const;

Pre-Condition

The session is open.

Description

Gets information about a currently running job.

Parameters

TSmlJobId &

On return, the ID of the currently running job. KSmlNullId if no jobs are running.

TSmlUsageType &

On return, the type of the currently running job.

Leave codes

System

error codes.


ListQueuedJobsL()

IMPORT_C void ListQueuedJobsL(RArray< TSmlJobId > &, TSmlUsageType) const;

Pre-Condition

The session is open.

Description

Gets a list of IDs of all queued jobs of the specified type.

Parameters

RArray< TSmlJobId > &

On return, the list of IDs.

TSmlUsageType

The type of jobs to return (data sync or device management).

Leave codes

System

error codes.


ListProfilesL()

IMPORT_C void ListProfilesL(RArray< TSmlProfileId > &, TSmlUsageType) const;

Pre-Condition

The session is open.

Description

Gets a list of IDs of all defined profiles of the specified type.

Parameters

RArray< TSmlProfileId > &

On return, the list of IDs.

TSmlUsageType

The type of profiles to return (data sync or device management).

Leave codes

System

error codes.


ListTransportsL()

IMPORT_C void ListTransportsL(RArray< TSmlTransportId > &) const;

Pre-Condition

The session is open.

Description

Gets a list of IDs of all available communications transports.

Parameters

RArray< TSmlTransportId > &

On return, the list of IDs.

Leave codes

System

error codes.


ListDataProvidersL()

IMPORT_C void ListDataProvidersL(RArray< TSmlDataProviderId > &) const;

Pre-Condition

The session is open.

Description

Gets a list of IDs of all available data providers.

Parameters

RArray< TSmlDataProviderId > &

On return, the list of IDs.

Leave codes

System

error codes.


DeleteProfileL()

Capability: WriteDeviceData

IMPORT_C void DeleteProfileL(TSmlProfileId);

Pre-Condition

The session is open.

Description

Deletes the profile with the specified ID.

Parameters

TSmlProfileId

The ID of the profile to delete.

Leave codes

SyncMLError::KErrObjectInUse

The specified profile is currently in use.

SyncMLError::KErrProfileNotFound

The specified profile does not exist.

Other

system-wide error codes.


Close()

IMPORT_C void Close();

Pre-Condition

All dependant sub-sessions have been closed.

Description

Close the session, freeing all resources.