epoc32/include/SyncMLClientDS.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: SyncML APIs for data synchronization client.
    15 *
    16 */
    17 
    18 
    19 #ifndef __SYNCMLCLIENTDS_H__
    20 #define __SYNCMLCLIENTDS_H__
    21 //
    22 #include <SyncMLClient.h>
    23 #include <SyncMLDataFilter.h>
    24 //
    25 class CClientSessionData;
    26 //
    27 
    28 ///////////////////////////////////////////////////////////////////////////////
    29 // RSyncMLDataSyncJob
    30 ///////////////////////////////////////////////////////////////////////////////
    31 class RSyncMLDataSyncJob : public RSyncMLJobBase
    32 /**
    33 	Handle to a data synchronisation job.
    34 	
    35 	A job synchronises the data in one or more data stores, as defined by the list 
    36 	of tasks.
    37 	@publishedAll
    38 	@released
    39 */
    40 	{
    41 public:
    42 	IMPORT_C RSyncMLDataSyncJob();
    43 	IMPORT_C void CreateL(RSyncMLSession&, TSmlProfileId);
    44 	IMPORT_C void CreateL(RSyncMLSession&, TSmlProfileId, TSmlConnectionId);
    45 	IMPORT_C void CreateL(RSyncMLSession&, TSmlProfileId, TSmlSyncType);
    46 	IMPORT_C void CreateL(RSyncMLSession&, TSmlProfileId, TSmlConnectionId, TSmlSyncType);
    47 	IMPORT_C void CreateL(RSyncMLSession&, TSmlProfileId, const RArray<TSmlTaskId>&);
    48 	IMPORT_C void CreateL(RSyncMLSession&, TSmlProfileId, TSmlConnectionId, const RArray<TSmlTaskId>&);
    49 	IMPORT_C void CreateL(RSyncMLSession&, TSmlProfileId, TSmlSyncType, const RArray<TSmlTaskId>&);
    50 	IMPORT_C void CreateL(RSyncMLSession&, TSmlProfileId, TSmlConnectionId, TSmlSyncType, const RArray<TSmlTaskId>&);
    51 	IMPORT_C void OpenL(RSyncMLSession&, TSmlJobId);
    52 	IMPORT_C void StopL();
    53 	IMPORT_C const RArray<TSmlTaskId>& TaskIDs() const;
    54 	};
    55 
    56 ///////////////////////////////////////////////////////////////////////////////
    57 ///////////////////////////////////////////////////////////////////////////////
    58 
    59 
    60 ///////////////////////////////////////////////////////////////////////////////
    61 // RSyncMLDataSyncProfile
    62 ///////////////////////////////////////////////////////////////////////////////
    63 class RSyncMLDataSyncProfile : public RSyncMLProfileBase
    64 /**
    65 	Handle to a SyncML Data Synchronisation profile. 
    66 	
    67 	A profile encapsulates a relationship with a single SyncML remote server, 
    68 	and contains a number of 'tasks' and 'connections'.
    69 	@publishedAll
    70 	@released
    71 */
    72 	{
    73 public:
    74 	IMPORT_C RSyncMLDataSyncProfile();
    75 	IMPORT_C void CreateL(RSyncMLSession&);
    76 	IMPORT_C void OpenL(RSyncMLSession&, TSmlProfileId, TSmlOpenMode);
    77 
    78 	IMPORT_C void SetCreatorId(TSmlCreatorId);
    79 	IMPORT_C void SetDisplayNameL(const TDesC&);
    80 	IMPORT_C void SetUserNameL(const TDesC8&);
    81 	IMPORT_C void SetPasswordL(const TDesC8&);
    82 
    83 	IMPORT_C void DeleteConnectionL(TSmlTransportId);
    84 
    85 	IMPORT_C void ListTasksL(RArray<TSmlTaskId>&) const;
    86 	IMPORT_C void DeleteTaskL(TSmlTaskId);
    87 
    88 	IMPORT_C void UpdateL();
    89 	};
    90 
    91 ///////////////////////////////////////////////////////////////////////////////
    92 ///////////////////////////////////////////////////////////////////////////////
    93 
    94 
    95 ///////////////////////////////////////////////////////////////////////////////
    96 // RSyncMLTask
    97 ///////////////////////////////////////////////////////////////////////////////
    98 class RSyncMLTask : public RSubSessionBase
    99 /**
   100 	Represents a mapping between a local data store and a remote
   101 	data store on a SyncML server in the context of a profile.
   102 	@publishedAll
   103 	@released
   104 */
   105 	{
   106 public:
   107 	IMPORT_C RSyncMLTask();
   108 	IMPORT_C void CreateL(RSyncMLDataSyncProfile&, TSmlDataProviderId,
   109 		const TDesC& aServerDataSource, const TDesC& aClientDataSource);
   110 	IMPORT_C void CreateL(RSyncMLDataSyncProfile&, TSmlDataProviderId,
   111 		const TDesC& aServerDataSource, const TDesC& aClientDataSource, RPointerArray<CSyncMLFilter>& aArray);
   112 	IMPORT_C void OpenL(RSyncMLDataSyncProfile&, TSmlTaskId);
   113 
   114 	IMPORT_C TSmlTaskId Identifier() const;
   115 	IMPORT_C TSmlProfileId Profile() const;
   116 	IMPORT_C TSmlCreatorId CreatorId() const;
   117 	IMPORT_C const TDesC& DisplayName() const;
   118 	IMPORT_C const TDesC& ServerDataSource() const;
   119 	IMPORT_C const TDesC& ClientDataSource() const;
   120 	IMPORT_C TSmlDataProviderId DataProvider() const;
   121 	IMPORT_C TSmlSyncType DefaultSyncType() const;
   122 	
   123 	//IMPORT_C TInt ServerFilterCount() const;
   124 	//IMPORT_C const CSyncMLFilter& ServerFilterL(TInt aIndex) const; // Get the server filter at the specified index
   125 	IMPORT_C TSyncMLFilterMatchType FilterMatchType() const;
   126 	IMPORT_C TBool Enabled() const;
   127 
   128 	IMPORT_C void SetCreatorId(TSmlCreatorId);
   129 	IMPORT_C void SetDisplayNameL(const TDesC&);
   130 	IMPORT_C void SetDefaultSyncTypeL(TSmlSyncType);
   131 	//IMPORT_C void ReplaceServerFilterL(TInt aIndex, const CSyncMLFilter& aFilter); // Replaces the server filter at the specified index
   132 	//IMPORT_C TInt AddServerFilterL(const CSyncMLFilter& aFilter); // Adds the server filter, returns the index at which it was added
   133 	//IMPORT_C void DeleteServerFilterL(TInt aIndex); // Deletes the server filter at the specified index
   134 	//IMPORT_C void DeleteAllServerFiltersL(); // Deletes all server filters
   135 	//IMPORT_C void SetServerFilterEnabledL(TInt aIndex, TBool aEnable); // Changes the enabled flag for the server filter at the specified index
   136 	IMPORT_C void SetFilterMatchTypeL(TSyncMLFilterMatchType) const;
   137 	IMPORT_C void SetEnabledL(TBool);
   138 
   139 	/* Return the set of filters that can be used to send to the SyncML server. This will only contain filters which are
   140 	supported by the server, unless
   141 	1) no previous synchronisation with the server was done, or
   142 	2) the underlying Data Provider does not support this feature. In both cases the full list of filters supported by
   143 	the Data Provider will be returned. */
   144 	IMPORT_C RPointerArray<CSyncMLFilter>& SupportedServerFiltersL( TSyncMLFilterChangeInfo& aChangeInfo ) const;
   145 	IMPORT_C TBool SupportsUserSelectableMatchType() const;
   146 
   147 	IMPORT_C TBool IsReadOnly() const;
   148 	IMPORT_C void UpdateL();
   149 	IMPORT_C void Close();
   150 
   151 private:
   152 	mutable CClientSessionData* iData;
   153 private:
   154 	// Prohibited.
   155 	RSyncMLTask& operator=(const RSyncMLTask&);
   156 	RSyncMLTask(const RSyncMLTask&);
   157 	};
   158 
   159 ///////////////////////////////////////////////////////////////////////////////
   160 ///////////////////////////////////////////////////////////////////////////////
   161 
   162 
   163 ///////////////////////////////////////////////////////////////////////////////
   164 // RSyncMLDataProvider
   165 ///////////////////////////////////////////////////////////////////////////////
   166 class RSyncMLDataProvider : public RSubSessionBase
   167 /**
   168 	Handle to information about an available SyncML data provider.
   169 	@publishedAll
   170 	@released
   171 */
   172 	{
   173 public:
   174 	IMPORT_C RSyncMLDataProvider();
   175 	IMPORT_C void OpenL(RSyncMLSession&, TSmlDataProviderId);
   176 
   177 	IMPORT_C TSmlDataProviderId Identifier() const;
   178 	IMPORT_C TVersion Version() const;
   179 	IMPORT_C const TDesC& DisplayName() const;
   180   
   181   IMPORT_C TInt MimeTypeCount() const;
   182 	IMPORT_C const TDesC& MimeType(TInt aIndex) const;
   183 	IMPORT_C const TDesC& MimeVersion(TInt aIndex) const;
   184 
   185 	IMPORT_C const TDesC& DefaultDataStoreName() const;
   186 	IMPORT_C TBool AllowsMultipleDataStores() const;
   187 	IMPORT_C void GetDataStoreNamesL(CDesCArray&) const;
   188 
   189 	/* Return the set of filters that can be used to send to the SyncML server */
   190 	//IMPORT_C const RPointerArray<CSyncMLFilterDef>& SupportedServerFiltersL() const;
   191 
   192 	IMPORT_C TSmlProtocolVersion RequiredProtocolVersionL() const;
   193 
   194 	IMPORT_C void Close();
   195 
   196 private:
   197 	mutable CClientSessionData* iData;
   198 private:
   199 	// Prohibited.
   200 	RSyncMLDataProvider& operator=(const RSyncMLDataProvider&);
   201 	RSyncMLDataProvider(const RSyncMLDataProvider&);
   202 	};
   203 
   204 ///////////////////////////////////////////////////////////////////////////////
   205 ///////////////////////////////////////////////////////////////////////////////
   206 
   207 ///////////////////////////////////////////////////////////////////////////////
   208 ///////////////////////////////////////////////////////////////////////////////
   209 ///////////////////////////////////////////////////////////////////////////////
   210 #endif