|
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 session class. This class is |
|
15 // responsible for passing the requests that have come from the main |
|
16 // front-end server's engine handle to the main engine class. |
|
17 // |
|
18 // |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalComponent |
|
23 */ |
|
24 |
|
25 #ifndef __SYNCENGINESESSION_H__ |
|
26 #define __SYNCENGINESESSION_H__ |
|
27 |
|
28 #include "SyncEngineServer.h" |
|
29 |
|
30 |
|
31 /** |
|
32 * This is the Background Sync Engine side session class and is responsible |
|
33 * for handling the client (RSyncEngineSession) requests, encoding/decoding |
|
34 * the parameters and Contacts Item phonebook data across the API. |
|
35 * Once the parameters are decoded the request is sent to the engine where |
|
36 * it will be handled by one of the Active Objects. Once the request is |
|
37 * completed, any return parameters are written back to the client if |
|
38 * neccessary. |
|
39 * |
|
40 * @internalComponent |
|
41 */ |
|
42 class CSyncEngineSession : public CSession2 |
|
43 { |
|
44 public: |
|
45 void CreateL(); |
|
46 void CompleteRequest(const RMessage2& aMessage, TInt aResult) const; |
|
47 |
|
48 inline CSyncEngineServer& Server(); |
|
49 |
|
50 private: |
|
51 ~CSyncEngineSession(); |
|
52 |
|
53 void ServiceL(const RMessage2& aMessage); |
|
54 void DoSynchronisationL(const RMessage2& aMessage); |
|
55 void DeleteCntFromICCL(const RMessage2& aMessage); |
|
56 void WriteCntToICCL(const RMessage2& aMessage); |
|
57 void DoSynchronisationCancelL(const RMessage2& aMessage); |
|
58 void DeleteCntFromICCCancelL(const RMessage2& aMessage); |
|
59 void WriteCntToICCCancelL(const RMessage2& aMessage); |
|
60 }; |
|
61 |
|
62 /** |
|
63 * Returns a reference to the CSyncEngineServer class. |
|
64 */ |
|
65 inline CSyncEngineServer& CSyncEngineSession::Server() |
|
66 { |
|
67 return *static_cast<CSyncEngineServer*>(const_cast<CServer2*>(CSession2::Server())); |
|
68 } // CSyncEngineSession::Server |
|
69 |
|
70 |
|
71 #endif // __SYNCENGINESESSION_H__ |
|
72 |