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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HSACTIVITYSERVERPRIVATE_H |
|
19 #define HSACTIVITYSERVERPRIVATE_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include "hsactivitydbclientinterface.h" |
|
23 |
|
24 /** |
|
25 * Class implemets server functionality for S60 enviroment |
|
26 */ |
|
27 class HsActivityServerPrivate : public CServer2 |
|
28 { |
|
29 public: |
|
30 /** |
|
31 * Constructor |
|
32 */ |
|
33 HsActivityServerPrivate(HsActivityDbClientInterface &storage); |
|
34 |
|
35 /** |
|
36 * Destructor |
|
37 */ |
|
38 ~HsActivityServerPrivate(); |
|
39 |
|
40 /** |
|
41 * Function establish server and initialize listening proces |
|
42 * @return true on succees, false otherwise |
|
43 */ |
|
44 bool start(); |
|
45 |
|
46 /** |
|
47 * Function look for active application session and complete pending message |
|
48 */ |
|
49 void notifyL(int applicationId, const QString &activityName); |
|
50 |
|
51 /** |
|
52 * Cancel notification |
|
53 */ |
|
54 void cancelNotify(int applicationId); |
|
55 |
|
56 /** |
|
57 * Function add item to pending messages |
|
58 */ |
|
59 void waitNotification(int applicationId, const RMessage2 &msg); |
|
60 private: |
|
61 /** |
|
62 * Function create new client session to handle its request |
|
63 * @param version - client implementation version |
|
64 * @param message - request message |
|
65 */ |
|
66 CSession2 *NewSessionL(const TVersion &version,const RMessage2 &message)const; |
|
67 |
|
68 private: |
|
69 /** |
|
70 * Reference to initialized storage client |
|
71 */ |
|
72 HsActivityDbClientInterface &mStorage; |
|
73 |
|
74 QHash<int,RMessage2> mPendingMessage; |
|
75 }; |
|
76 |
|
77 #endif //HSACTIVITYSERVERPRIVATE_H |
|