|
1 /* |
|
2 * Copyright (c) 2004 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: SyncML alert error constants definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __NSMLALERTQUEUEDEFS_H__ |
|
20 #define __NSMLALERTQUEUEDEFS_H__ |
|
21 |
|
22 const TInt KNSmlAlertServerIdLenPos = 24; |
|
23 const TInt KNSmlAlertVersionPos = 16; |
|
24 const TInt KNSmlAlertVersion = 12; |
|
25 |
|
26 const TInt KNSmlAlertSession = 21; |
|
27 const TInt KNSmlAlertServerIdLength = 23; |
|
28 |
|
29 const TInt KNSmlDSAgentSyncInfoPos = 1; |
|
30 const TInt KNSmlDSAgentContentTypePos = 4; |
|
31 const TInt KNSmlDSAgentServerURILenPos = 5; |
|
32 const TInt KNSmlDSAgentAlertCodeBase = 200; |
|
33 const TInt KNSmlDSDbChangeQueryMaxTime = 30; |
|
34 |
|
35 const TInt KNSmlServerAlertCode = 200; |
|
36 const TInt KNSmlServerAlertCodeTwoWay = 206; |
|
37 const TInt KNSmlServerAlertCodeOneWayFromClient = 207; |
|
38 const TInt KNSmlServerAlertCodeRefreshFromClient = 208; |
|
39 const TInt KNSmlServerAlertCodeOneWayFromServer = 209; |
|
40 const TInt KNSmlServerAlertCodeRefreshFromServer = 210; |
|
41 |
|
42 const TInt KNSmlDatabasePathStartPos = 5; |
|
43 |
|
44 |
|
45 // masks |
|
46 const TUint8 KUiModeMask = 0x30; |
|
47 const TUint8 KInitiatorMask = 0x8; |
|
48 const TUint8 KMaskUpperFuture = 0x7; |
|
49 const TUint8 KFutureMask = 0xF; |
|
50 |
|
51 const TInt KNSmlBufLength = 16; |
|
52 |
|
53 _LIT( KNSmlAlertDirAndResource, "z:NSMLDSTYPESRES.RSC" ); |
|
54 |
|
55 //Container for task id and sync type pairs |
|
56 class TNSmlContentTypeInfo |
|
57 { |
|
58 public: |
|
59 TInt iTaskId; |
|
60 TSmlSyncType iSyncType; |
|
61 }; |
|
62 |
|
63 //Container for server alerted info |
|
64 class CNSmlAlertJobInfo : public CBase |
|
65 { |
|
66 public: |
|
67 virtual ~CNSmlAlertJobInfo(); |
|
68 TSmlUsageType iType; |
|
69 TInt iProfileId; |
|
70 TInt iTransportId; |
|
71 TInt iSessionId; |
|
72 TPtrC8 iPackage; |
|
73 CArrayFix<TNSmlContentTypeInfo>* iContentType; |
|
74 TInt iUimode; |
|
75 }; |
|
76 |
|
77 //Notifies server to create a new (server alerted) job |
|
78 class MNSmlAlertObserver |
|
79 { |
|
80 public: |
|
81 |
|
82 /** |
|
83 * void CreateJobL( CNSmlAlertJobInfo& aJobInfo ) |
|
84 * @param aJobInfo - reference to CNSmlAlertJobInfo |
|
85 * @return - |
|
86 */ |
|
87 virtual void CreateJobL( CNSmlAlertJobInfo& aJobInfo ) = 0; |
|
88 |
|
89 /** |
|
90 * void DoDisconnectL() |
|
91 * Disconnects local connection. |
|
92 * @param - |
|
93 * @return - |
|
94 */ |
|
95 virtual void DoDisconnectL() = 0; |
|
96 }; |
|
97 |
|
98 |
|
99 |
|
100 #endif |