Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

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

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:

Inherited from RSubSessionBase:


Construction and destruction


RSyncMLTask()

IMPORT_C RSyncMLTask();

Description

Default constructor.

[Top]


Member functions


CreateL(RSyncMLDataSyncProfile &,TSmlDataProviderId,const TDesC &,const TDesC &)

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 TDesC16 &aServerDataSource

The name of the server store to synchronise with.

const TDesC16 &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(RSyncMLDataSyncProfile &,TSmlTaskId)

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

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

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

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

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 TDesC16 &

The name of the task.


ServerDataSource()const

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 TDesC16 &

The name of the data store.


ClientDataSource()const

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 TDesC16 &

The name of the data store.


DataProvider()const

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

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

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

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

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

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

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

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.

SyncMLError::KErrProfileAccessDenied

Owning profile is locked


SetDisplayNameL(const TDesC &)

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 TDesC16 &

The new name for the task.

Leave codes

KErrNoMemory

Insufficient system memory to complete the operation.

SyncMLError::KErrProfileAccessDenied

Owning profile is locked

System

error codes.


SetDefaultSyncTypeL(TSmlSyncType)

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

SyncMLError::KErrProfileAccessDenied

Owning profile is locked

System

error codes.


UpdateServerFilterL(const CSyncMLFilter &)

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

SyncMLError::KErrProfileAccessDenied

Owning profile is locked


AddServerFilterL(const CSyncMLFilter &)

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

Leave codes

SyncMLError::KErrProfileAccessDenied

Owning profile is locked


DeleteServerFilterL(TSmlFilterId)

IMPORT_C void DeleteServerFilterL(TSmlFilterId aId);

Description

Disables a stored filter

Parameters

TSmlFilterId aId

The ID of the filter to disable

Leave codes

SyncMLError::KErrProfileAccessDenied

Owning profile is locked


DeleteAllServerFiltersL()

IMPORT_C void DeleteAllServerFiltersL();

Description

Disables all the filters of the task

Leave codes

SyncMLError::KErrProfileAccessDenied

Owning profile is locked


SetFilterMatchTypeL(TSyncMLFilterMatchType)

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;

SyncMLError::KErrProfileAccessDenied

Owning profile is locked


SetFilterOutsideInclusionTypeL(TSyncMLFilterOutsideInclusionType)

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;

SyncMLError::KErrProfileAccessDenied

Owning profile is locked


SetEnabledL(TBool)

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.

SyncMLError::KErrProfileAccessDenied

Owning profile is locked


SupportedServerFiltersL(RPointerArray< CSyncMLFilter > &)const

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

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