|
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Header file for the Background Sync Engine client interface. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef __SYNCENGINECLIENT_H__ |
|
24 #define __SYNCENGINECLIENT_H__ |
|
25 |
|
26 #include <e32std.h> |
|
27 #include <cntdef.h> |
|
28 #include <cntdb.h> |
|
29 #include <cntitem.h> |
|
30 #include <cntfldst.h> |
|
31 |
|
32 #include "PhonebookManager.h" |
|
33 |
|
34 |
|
35 /** |
|
36 * Provides the front-end server with client access to a session with the |
|
37 * Background Sync Engine. |
|
38 */ |
|
39 class RSyncEngineSession : public RSessionBase |
|
40 { |
|
41 public: |
|
42 RSyncEngineSession(); |
|
43 |
|
44 TInt Connect(CPhoneBookManager* aPhoneBookManager); |
|
45 void Close(); |
|
46 |
|
47 void DoSynchronisation(TRequestStatus& aReqStatus, TUid aPhonebookUid); |
|
48 void DoSynchronisationCancel(TUid aPhonebookId); |
|
49 void DeleteContact(TRequestStatus& aReqStatus, TUid aPhonebookUid, |
|
50 TContactItemId aId); |
|
51 void DeleteContactCancel(TUid aPhonebookUid); |
|
52 void WriteContact(TRequestStatus& aReqStatus, |
|
53 TPtrC8& aTemplateIdAndBufferSizePtr, |
|
54 TPtr8& aSlotNumberPtr, |
|
55 TPtr8& aPhoneBookUidPtr, |
|
56 TPtr8& aICCEntryBufPtr); |
|
57 void WriteContactCancel(TUid aPhonebookId); |
|
58 |
|
59 private: |
|
60 RSyncEngineSession(const RSyncEngineSession& aSession); |
|
61 |
|
62 TInt StartPhBkSyncEngine(CPhoneBookManager* aPhoneBookManager); |
|
63 |
|
64 RThread iEngineThread; |
|
65 TRequestStatus iEngineThreadStatus; |
|
66 }; |
|
67 |
|
68 |
|
69 #endif // __SYNCENGINECLIENT_H__ |