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