|
1 // Copyright (c) 2008-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 // |
|
15 |
|
16 #ifndef SSMSWPPOLICYCLI_H |
|
17 #define SSMSWPPOLICYCLI_H |
|
18 |
|
19 #include <e32std.h> |
|
20 |
|
21 #include <ssm/ssmswppolicy.h> |
|
22 #include <ssm/ssmswp.h> |
|
23 #include <ssm/ssmcommandlist.h> |
|
24 #include "ssmdebug.h" |
|
25 |
|
26 const TInt KSsmSwpPolicySrvMsgSlots = 1; // This value was fixed during design. |
|
27 const TInt KSsmSwpPolicyCliVersionMajor = 0; // 0-127 |
|
28 const TInt KSsmSwpPolicyCliVersionMinor = 0; // 0-99 |
|
29 const TInt KSsmSwpPolicyCliVersionBuild = 0; // 0-32767 |
|
30 |
|
31 /** |
|
32 The SsmSwpPolicy server client session. |
|
33 |
|
34 @internalComponent |
|
35 @released |
|
36 */ |
|
37 NONSHARABLE_CLASS(RSsmSwpPolicySession) : public RSessionBase |
|
38 { |
|
39 public: |
|
40 RSsmSwpPolicySession(); |
|
41 void ConnectL(); |
|
42 |
|
43 // For testing purposes |
|
44 #ifdef TEST_SSM_SERVER |
|
45 void ConnectL(const TDesC& aServerName); |
|
46 #endif // TEST_SSM_SERVER |
|
47 |
|
48 void Close(); |
|
49 |
|
50 void CallSetDllHandleAndInitialize(TInt aPolicyHandle, TRequestStatus& aStatus); |
|
51 TInt CallInitializeCancel(); |
|
52 void CallPrepareCommandList(const TSsmSwp& aSwp, TRequestStatus& aStatus); |
|
53 TInt CallPrepareCommandListCancel(); |
|
54 CSsmCommandList* CallCommandListL(); |
|
55 void CallHandleCleReturnValue(const TSsmSwp& aSwp, TInt aError, TInt aSeverity, TRequestStatus& aStatus); |
|
56 TInt CallHandleCleReturnValueCancel(); |
|
57 |
|
58 TBool IsConnected(); |
|
59 private: |
|
60 RBuf8 iCmdListBuf; |
|
61 TVersion iVersion; |
|
62 }; |
|
63 |
|
64 #endif //SSMSWPPOLICYCLI_H |