Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: SyncMLClientDS.h
Link against: smlclient.lib

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

Class RSyncMLTask

class RSyncMLTask : public RSubSessionBase;

Description

Represents a mapping between a local data store and a remote data store on a SyncML server in the context of a profile.

Derivation

Members

Defined in RSyncMLTask:
AddServerFilterL(), ClientDataSource(), Close(), CreateL(), CreatorId(), DataProvider(), DefaultSyncType(), DeleteAllServerFiltersL(), DeleteServerFilterL(), DisplayName(), Enabled(), FilterMatchType(), GetServerFilterIdsL(), Identifier(), IsReadOnly(), OpenL(), OutsideInclusionType(), Profile(), RSyncMLTask(), ServerDataSource(), ServerFilterLC(), SetCreatorId(), SetDefaultSyncTypeL(), SetDisplayNameL(), SetEnabledL(), SetFilterMatchTypeL(), SetFilterOutsideInclusionTypeL(), SupportedServerFiltersL(), SupportsUserSelectableMatchTypeL(), UpdateL(), UpdateServerFilterL()

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


Construction and destruction


RSyncMLTask()

IMPORT_C RSyncMLTask();

Description

Default constructor.

[Top]


Member functions


CreateL()

IMPORT_C void CreateL(RSyncMLDataSyncProfile &, TSmlDataProviderId, const TDesC &aServerDataSource, const TDesC &aClientDataSource);

Description

Creates a new, blank, task in the specified profile and opens this object as a handle to it. The new task will contain all the filters supported by the associated data provider.

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

Parameters

RSyncMLDataSyncProfile &

An open profile handle.

TSmlDataProviderId

The ID of the data provider to use for this task.

const TDesC &aServerDataSource

The name of the server store to synchronise with.

const TDesC &aClientDataSource

The name of the local store to synchronise.

Leave codes

SyncMLError::KErrProfileAccessDenied

The parent profile is not open for edit.

KErrNoMemory

Insufficient system memory to complete the operation.

System

error codes.


OpenL()

IMPORT_C void OpenL(RSyncMLDataSyncProfile &, TSmlTaskId);

Description

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

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

Parameters

RSyncMLDataSyncProfile &

An open profile handle.

TSmlTaskId

The ID of the task to open.

Leave codes

SyncMLError::KErrTaskNotFound

The specified task ID does not represent an existing task.

KErrNoMemory

Insufficient system memory to complete the operation.

System

error codes.


Identifier()

IMPORT_C TSmlTaskId Identifier() const;

Pre-Condition

The handle is open.

Description

Gets the ID of the task referenced by this handle.

Return value

TSmlTaskId

The task ID.


Profile()

IMPORT_C TSmlProfileId Profile() const;

Pre-Condition

The handle is open.

Description

Gets the ID of the parent profile of this task.

Return value

TSmlProfileId

The profile ID.


CreatorId()

IMPORT_C TSmlCreatorId CreatorId() const;

Pre-Condition

The handle is open.

Description

Gets the ID of the creator of the task referenced by this handle.

This ID is for use by clients that wish to be able to identify specific tasks.

Return value

TSmlCreatorId

An identifier that has meaning to the client.


DisplayName()

IMPORT_C const TDesC &DisplayName() const;

Pre-Condition

The handle is open.

Description

Gets the human readable display name of the task referenced by this handle.

Return value

const TDesC &

The name of the task.


ServerDataSource()

IMPORT_C const TDesC &ServerDataSource() const;

Pre-Condition

The handle is open.

Description

Gets the name of the server data store that is synchronised by this task.

Return value

const TDesC &

The name of the data store.


ClientDataSource()

IMPORT_C const TDesC &ClientDataSource() const;

Pre-Condition

The handle is open.

Description

Gets the name of the local data store that is synchronised by this task.

Return value

const TDesC &

The name of the data store.


DataProvider()

IMPORT_C TSmlDataProviderId DataProvider() const;

Pre-Condition

The handle is open.

Description

Gets the ID of the data provider used to synchronise this task.

Return value

TSmlDataProviderId

The name of the data store.


DefaultSyncType()

IMPORT_C TSmlSyncType DefaultSyncType() const;

Pre-Condition

The handle is open.

Description

Gets the default synchronisation type of this task.

Return value

TSmlSyncType

The default synchronisation type.


GetServerFilterIdsL()

IMPORT_C void GetServerFilterIdsL(RArray< TSmlFilterId > &aFilterIds) const;

Pre-Condition

aFilterIds has to be empty

Description

Gets an array of all the filter IDs that are stored for this task

Parameters

RArray< TSmlFilterId > &aFilterIds

The array where to store the results

Leave codes

KErrArgument

If the array passed in is not empty

Panic codes

KErrArgument

If the array passed in is not empty (only in debug mode)


ServerFilterLC()

IMPORT_C CSyncMLFilter *ServerFilterLC(TSmlFilterId aId);

Description

Retrieves the filter with the given ID and returns an instantance of CSyncMLFilter class which is also left on the cleanup stack.

Parameters

TSmlFilterId aId

The ID of the filter to be retrieved

Return value

CSyncMLFilter *

The instance of CSyncMLFilter with the given ID

Leave codes

KErrNotFound

If there is no filter with the given ID


FilterMatchType()

IMPORT_C TSyncMLFilterMatchType FilterMatchType() const;

Description

Specifies if the filters of the current task get treated as having AND or OR relationship between them.

Return value

TSyncMLFilterMatchType

The current setting for the task


OutsideInclusionType()

IMPORT_C TSyncMLFilterOutsideInclusionType OutsideInclusionType() const;

Description

Specifies if new sync with changed filters will be inclusive or exclusive to the previous sync

Return value

TSyncMLFilterOutsideInclusionType

The current option for the task


Enabled()

IMPORT_C TBool Enabled() const;

Pre-Condition

The handle is open.

Description

Tests if this task is enabled.

Disabled tasks will not be synchronised.

Return value

TBool

True if this task is enabled, false if this task is disabled.


SetCreatorId()

IMPORT_C void SetCreatorId(TSmlCreatorId);

Pre-Condition

The handle is open.

Description

Sets the client creator ID of the task referenced by this handle.

This ID is for use by clients that wish to be able to identify specific tasks.

Parameters

TSmlCreatorId

The new creator ID for the task.

Leave codes

KErrNoMemory

Insufficient system memory.


SetDisplayNameL()

IMPORT_C void SetDisplayNameL(const TDesC &);

Pre-Condition

The handle is open.

Description

Sets the human-readable display name of the task referenced by this handle.

Parameters

const TDesC &

The new name for the task.

Leave codes

KErrNoMemory

Insufficient system memory to complete the operation.

System

error codes.


SetDefaultSyncTypeL()

IMPORT_C void SetDefaultSyncTypeL(TSmlSyncType);

Pre-Condition

The handle is open.

Description

Sets the default synchonisation type of the task referenced by this handle.

Parameters

TSmlSyncType

The new default synchronisation type.

Leave codes

System

error codes.


UpdateServerFilterL()

IMPORT_C void UpdateServerFilterL(const CSyncMLFilter &aFilter);

Description

Updates in the data store the filter that is passed in. The update is done according to the information contained in the CSyncMLFilter object passed in. Leaves if filter with the ID of the one passed in doesn't exist.

Parameters

const CSyncMLFilter &aFilter

The filter to update and its updates

Leave codes

KErrArgument

If the updates for the filter would change it's type (so it wouldn't be the same as the data provider one)

KErrNotFound

If there is no filter with the ID of the filter passed in for updating


AddServerFilterL()

IMPORT_C void AddServerFilterL(const CSyncMLFilter &aFilter);

Description

Enables the filter passed in. It has to be a filter that is already stored.

Parameters

const CSyncMLFilter &aFilter

The filter that will be enabled


DeleteServerFilterL()

IMPORT_C void DeleteServerFilterL(TSmlFilterId aId);

Description

Disables a stored filter

Parameters

TSmlFilterId aId

The ID of the filter to disable


DeleteAllServerFiltersL()

IMPORT_C void DeleteAllServerFiltersL();

Description

Disables all the filters of the task


SetFilterMatchTypeL()

IMPORT_C void SetFilterMatchTypeL(TSyncMLFilterMatchType);

Description

Sets if the filters of the current task get treated as having AND or OR relationship between them.

Parameters

TSyncMLFilterMatchType

The desired setting

Leave codes

KErrPermissionDenied

If the user can't select the match type

KErrArgument

If the filter match type is not one of the expected ones;


SetFilterOutsideInclusionTypeL()

IMPORT_C void SetFilterOutsideInclusionTypeL(TSyncMLFilterOutsideInclusionType);

Description

Specifies if new sync with changed filters will be inclusive or exclusive to the previous sync

Parameters

TSyncMLFilterOutsideInclusionType

Leave codes

KErrArgument

If the filter inclusion type is not one of the expected ones;


SetEnabledL()

IMPORT_C void SetEnabledL(TBool);

Pre-Condition

The handle is open.

Description

Enables or disables the task referenced by this handle.

Disabled tasks are not synchronised.

Parameters

TBool

Zero to disable the task, non-zero to enable it.

Leave codes

System

error codes.


SupportedServerFiltersL()

IMPORT_C void SupportedServerFiltersL(RPointerArray< CSyncMLFilter > &aFilterArray) const;

Pre-Condition

aFilterArray has to be empty

Description

Returns an array of pointers to the filters that are supported by the server

Parameters

RPointerArray< CSyncMLFilter > &aFilterArray

The array of pointers to the server supported filters

Leave codes

KErrArgument

If the array passed in is not empty

Panic codes

KErrArgument

If the array passed in is not empty (only in debug mode)


SupportsUserSelectableMatchTypeL()

IMPORT_C TBool SupportsUserSelectableMatchTypeL() const;

Description

Specifies if the task allows for the user to select the matching type

Return value

TBool

ETrue if the user is allowed to select the matching type, EFalse otherwise


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 read-only, false if the parent profile 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 task data to the Sync Agent.

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


Close()

IMPORT_C void Close();

Description

Closes this handle.