40
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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 "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: RSconSyncSession header
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef _SCONSYNCCLIENT_H_
|
|
20 |
#define _SCONSYNCCLIENT_H_
|
|
21 |
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <e32std.h>
|
|
24 |
#include <ecom/ImplementationInformation.h>
|
|
25 |
#include <SmlDataProvider.h>
|
|
26 |
|
|
27 |
#include "scondataproviderinfo.h"
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
class CNSmlDataItemUidSet;
|
|
32 |
|
|
33 |
class RSconSyncSession : public RSessionBase
|
|
34 |
{
|
|
35 |
public:
|
|
36 |
IMPORT_C RSconSyncSession();
|
|
37 |
IMPORT_C ~RSconSyncSession();
|
|
38 |
|
|
39 |
IMPORT_C TInt Connect();
|
|
40 |
IMPORT_C void Close();
|
|
41 |
|
|
42 |
IMPORT_C void ListAllImplementationsL( RSconDataProviderInfoArray& aInfoArray );
|
|
43 |
|
|
44 |
IMPORT_C void OpenDataStoreL( const TSmlDataProviderId aProviderId, const TDesC& aStoreName, const TInt aContextId );
|
|
45 |
|
|
46 |
IMPORT_C void OpenItemL(TSmlDbItemUid aUid, TBool& aFieldChange,
|
|
47 |
TSmlDbItemUid& aParent, TDes8& aMimeType, TDes8& aMimeVer,
|
|
48 |
CBufFlat& aItemData );
|
|
49 |
|
|
50 |
IMPORT_C void CreateItemL(TSmlDbItemUid& aUid, TSmlDbItemUid aParent,
|
|
51 |
const TDesC8& aMimeType, const TDesC8& aMimeVer, const TDesC8& aData);
|
|
52 |
IMPORT_C void CreateItemL(TPckg<TSmlDbItemUid>& aUidPckg, TSmlDbItemUid aParent,
|
|
53 |
const TDesC8& aMimeType, const TDesC8& aMimeVer, const TDesC8& aData,
|
|
54 |
TRequestStatus& aStatus );
|
|
55 |
|
|
56 |
IMPORT_C void ReplaceItemL(TSmlDbItemUid aUid, TSmlDbItemUid aParent,
|
|
57 |
TBool aFieldChange, const TDesC8& aData);
|
|
58 |
IMPORT_C void ReplaceItemL(TSmlDbItemUid aUid, TSmlDbItemUid aParent,
|
|
59 |
TBool aFieldChange, const TDesC8& aData,
|
|
60 |
TRequestStatus& aStatus );
|
|
61 |
|
|
62 |
IMPORT_C void MoveItemL(TSmlDbItemUid aUid, TSmlDbItemUid aNewParent);
|
|
63 |
IMPORT_C void DeleteItemL(TSmlDbItemUid aUid);
|
|
64 |
IMPORT_C void SoftDeleteItemL(TSmlDbItemUid aUid);
|
|
65 |
IMPORT_C void DeleteAllItems( TRequestStatus& aStatus );
|
|
66 |
|
|
67 |
IMPORT_C TBool HasSyncHistoryL() const;
|
|
68 |
IMPORT_C void AddedItemsL( RArray<TSmlDbItemUid>& aItems ) const;
|
|
69 |
IMPORT_C void DeletedItemsL( RArray<TSmlDbItemUid>& aItems ) const;
|
|
70 |
IMPORT_C void SoftDeletedItemsL( RArray<TSmlDbItemUid>& aItems ) const;
|
|
71 |
IMPORT_C void ModifiedItemsL( RArray<TSmlDbItemUid>& aItems ) const;
|
|
72 |
IMPORT_C void MovedItemsL( RArray<TSmlDbItemUid>& aItems ) const;
|
|
73 |
|
|
74 |
IMPORT_C void CloseDataStore() const;
|
|
75 |
|
|
76 |
IMPORT_C void ResetChangeInfoL();
|
|
77 |
IMPORT_C void CommitChangeInfoL(const RArray<TSmlDbItemUid>& aItems );
|
|
78 |
|
|
79 |
IMPORT_C void GetSyncTimeStampL( const TSmlDataProviderId aProviderId, const TInt aContextId, TDateTime& aTimeStamp ) const;
|
|
80 |
|
|
81 |
IMPORT_C CSmlDataStoreFormat* StoreFormatL( const RStringPool& aStringPool );
|
|
82 |
IMPORT_C void SetRemoteStoreFormatL( const CSmlDataStoreFormat& aServerDataStoreFormat );
|
|
83 |
|
|
84 |
|
|
85 |
IMPORT_C void CancelRequest();
|
|
86 |
|
|
87 |
IMPORT_C TInt GetParent( TSmlDbItemUid aUid, TSmlDbItemUid& aParent );
|
|
88 |
private:
|
|
89 |
TInt StartServer();
|
|
90 |
TInt CreateAndSendChunkHandle();
|
|
91 |
private:
|
|
92 |
RChunk iChunk;
|
|
93 |
TIpcArgs iArgs;
|
|
94 |
|
|
95 |
};
|
|
96 |
|
|
97 |
#endif // _SCONSYNCCLIENT_H_
|
|
98 |
|
|
99 |
// End of File
|