63
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 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 |
|
|
19 |
|
|
20 |
#ifndef __CMSCOMMON_H__
|
|
21 |
#define __CMSCOMMON_H__
|
|
22 |
|
|
23 |
#include <e32def.h>
|
|
24 |
|
|
25 |
// server name
|
|
26 |
_LIT( KCmsServerName, "!CmsServer" );
|
|
27 |
_LIT( KCmsServerLib, "CmsServer" );
|
|
28 |
_LIT( KCmsServerExe, "cmsserver.exe");
|
|
29 |
|
|
30 |
// A version must be specifyed when creating a session with the server
|
|
31 |
const TUint KCmsSrvMajorVersionNumber = 0;
|
|
32 |
const TUint KCmsSrvMinorVersionNumber = 1;
|
|
33 |
const TUint KCmsSrvBuildVersionNumber = 1;
|
|
34 |
|
|
35 |
// Server panic codes
|
|
36 |
enum TCmsServerPanic
|
|
37 |
{
|
|
38 |
ECmsCreateServer = 0,
|
|
39 |
ECmsStartServer,
|
|
40 |
ECmsFileServerConnect,
|
|
41 |
EMainSchedulerError,
|
|
42 |
EBadSubSessionRemove,
|
|
43 |
EBadSubsessionHandle,
|
|
44 |
ENullInterfaceHandle,
|
|
45 |
ENullMessageHandle,
|
|
46 |
ENullContactHandle,
|
|
47 |
ENullBPASHandle,
|
|
48 |
EBufferOverflow,
|
|
49 |
EBadRequest
|
|
50 |
};
|
|
51 |
|
|
52 |
//Opcodes used in message passing between client and server
|
|
53 |
enum TCmsServerRequest
|
|
54 |
{
|
|
55 |
ECmsOpenID = 0,
|
|
56 |
ECmsOpenLink,
|
|
57 |
ECmsOpenPhoneNbr,
|
|
58 |
ECmsCancelOperation,
|
|
59 |
ECmsCloseSubsession,
|
|
60 |
ECmsFetchContactField,
|
|
61 |
ECmsFetchEnabledFields,
|
|
62 |
ECmsFetchContactIdentifier,
|
|
63 |
ECmsOrderNotification,
|
|
64 |
ECmsOrderNextNotification,
|
|
65 |
ECmsCancelNotification,
|
|
66 |
ECmsCancelExternalContactFind,
|
|
67 |
ECmsFindParentStore,
|
|
68 |
ECmsFindExternalContact,
|
|
69 |
ECmsFetchServiceAvailability,
|
|
70 |
ECmsGetContactActionFieldCount,
|
|
71 |
ECmsIsTopContact,
|
|
72 |
ECmsSetVoiceCallDefault
|
|
73 |
};
|
|
74 |
|
|
75 |
//Presence data stream delimiters
|
|
76 |
_LIT8( KDelimiterNewLine, "\r\n\r\n" );
|
|
77 |
_LIT8( KDelimiterSpaceLit, " " );
|
|
78 |
_LIT8( KDelimiterQuoteLit, "\"" );
|
|
79 |
const TInt KDelimiterSpace = 32;
|
|
80 |
const TInt KDelimiterQuote = 34;
|
|
81 |
|
|
82 |
//Presence data stream identifiers
|
|
83 |
const TInt KPresenceDataBrandId = 0;
|
|
84 |
const TInt KPresenceDataElementTextId = 1;
|
|
85 |
const TInt KPresenceDataElementImageId = 2;
|
|
86 |
const TInt KPresenceDataLanguageId = 3;
|
|
87 |
const TInt KPresenceDataUserIdentity = 4;
|
|
88 |
const TInt KPresenceDataServiceType = 5;
|
|
89 |
|
|
90 |
//Number of asynchronous requests
|
|
91 |
const TUint KTTMaxAsyncRequests = 4;
|
|
92 |
|
|
93 |
//Number of data transfer requests
|
|
94 |
const TUint KTTDataTransferRequests = 3;
|
|
95 |
|
|
96 |
//Default number of message slots per session
|
|
97 |
const TUint KTTDefaultMessageSlots = 52; // KTTMaxAsyncRequests + 2; // TODO: temporary for demo
|
|
98 |
|
|
99 |
const TInt KServerLogBufferMaxSize = 2000;
|
|
100 |
|
|
101 |
#endif // #ifndef __CMSCOMMON_H__
|
|
102 |
|
|
103 |
// End of File
|