|
1 /* |
|
2 * Copyright (c) 2007 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: Defines for Presence Cache. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef PRESENCECACHEDEFS2_H |
|
19 #define PRESENCECACHEDEFS2_H |
|
20 |
|
21 #include <e32std.h> |
|
22 |
|
23 /* |
|
24 * ============================================================================ |
|
25 * Presence cache constants |
|
26 * ============================================================================ |
|
27 */ |
|
28 namespace NCacheSrv2 |
|
29 { |
|
30 /** |
|
31 * Cache server version numbers |
|
32 */ |
|
33 namespace NVersion |
|
34 { |
|
35 const TInt KMajor = 1; |
|
36 const TInt KMinor = 1; |
|
37 const TInt KBuild = 1; |
|
38 } |
|
39 |
|
40 namespace DataBase |
|
41 { |
|
42 const TInt KBuddyIdMaxLen = 100; |
|
43 |
|
44 } |
|
45 |
|
46 |
|
47 /** |
|
48 * Cache server names |
|
49 */ |
|
50 namespace NName |
|
51 { |
|
52 _LIT( KExecutable, "presencecacheserver2.exe" ); |
|
53 _LIT( KMainThread, "PrCacheSrv2" ); |
|
54 _LIT( KSymbianServer, "!PresenceCacheSrv" ); |
|
55 // _LIT( KServerPattern, "*Presence*" ); |
|
56 } |
|
57 |
|
58 /** |
|
59 * Cache server requests |
|
60 */ |
|
61 namespace NRequest |
|
62 { |
|
63 //Number asynchronous message slots for Cache server |
|
64 const TUint KMsgSlotCount = 4; |
|
65 |
|
66 //Presence cache op synch. codes |
|
67 // Do not change the order of enums since they are referred by TPolicy. |
|
68 enum TOpSyncCodes |
|
69 { |
|
70 // Read security capabilities |
|
71 EPrepReadPresenceInfoSync = 1, |
|
72 EGetLastPreparedPacket, |
|
73 EGetLastAsyncPreparedPacket, |
|
74 EBuddyCountInAllServices, |
|
75 EBuddyCountInService, |
|
76 EGetServiceCount, |
|
77 //Subscription/Notification |
|
78 ESubscribeBuddyPresenceChange, // 0:aService.iUid, 1:myIdPack |
|
79 EUnSubscribeBuddyPresenceChange,// 0:aService.iUid, 1:myIdPack |
|
80 EGetLastNotifiedtPacket, // 0:&ptrBuf |
|
81 // Write security capabilities for the rest |
|
82 EWritePresenceInfoSync, |
|
83 EDeleteService, |
|
84 EDeletePresence |
|
85 }; //See the starting count in TOpAsyncCodes before adding here |
|
86 //Total number should be less than that here |
|
87 |
|
88 //Presence cache op asynch. codes |
|
89 enum TOpAsyncCodes |
|
90 { |
|
91 // Read security capabilities |
|
92 ENoRequestMade = 21, |
|
93 ECancelAsyncOperation, |
|
94 EPrepReadAllBuddiesPresenceInService, |
|
95 EPrepReadAllGivenBuddiesPresence, |
|
96 //Subscription/Notification related |
|
97 EWaitingForNotification, // 0:&sizePckg |
|
98 ECancelWaitingForNotification, // |
|
99 // Write security capabilities for the rest |
|
100 EWritePresenceInfoAsync |
|
101 }; |
|
102 } |
|
103 |
|
104 /** |
|
105 * Other constants |
|
106 */ |
|
107 namespace NConstants |
|
108 { |
|
109 //Number buddy infos write in each cycle of runl |
|
110 const TUint KMaxWriteEachCycle = 5; |
|
111 const TUint KMaxReadEachCycle = 5; |
|
112 const TUint KMaxServicesCount = 10; |
|
113 const TUint KGranularity = 10; |
|
114 } |
|
115 |
|
116 } |
|
117 |
|
118 #endif //PRESENCECACHEDEFS_H |