|
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 __CMSSESSION_H__ |
|
21 #define __CMSSESSION_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <f32file.h> |
|
26 |
|
27 //Constants |
|
28 #ifdef _DEBUG |
|
29 _LIT( KCmsClientLogDir, "CCA" ); |
|
30 _LIT( KCmsClientLogFile, "cmsclient.txt" ); |
|
31 const TInt KClientLogBufferMaxSize = 2000; |
|
32 #endif |
|
33 |
|
34 //FORWARD DECLARATIONS |
|
35 |
|
36 //CLASS DECLARATION |
|
37 class RCmsSession : public RSessionBase |
|
38 { |
|
39 public: // New functions |
|
40 |
|
41 /** |
|
42 * C++ Constructor. |
|
43 */ |
|
44 IMPORT_C RCmsSession(); |
|
45 |
|
46 /** |
|
47 * Connect to the server side session object |
|
48 * |
|
49 * @return TInt Error code |
|
50 */ |
|
51 IMPORT_C TInt Connect(); |
|
52 |
|
53 /** |
|
54 * Return the version of this component |
|
55 * |
|
56 * @return TVersion The version number |
|
57 */ |
|
58 IMPORT_C TVersion Version() const; |
|
59 |
|
60 /** |
|
61 * Destructor |
|
62 */ |
|
63 IMPORT_C ~RCmsSession(); |
|
64 |
|
65 public: //Not exported |
|
66 |
|
67 /** |
|
68 * Start the server |
|
69 * |
|
70 * @return TInt Error code |
|
71 */ |
|
72 TInt StartServer(); |
|
73 |
|
74 /** |
|
75 * Is the server already running |
|
76 * |
|
77 * @return TBool Is the server running |
|
78 */ |
|
79 TBool IsRunning(); |
|
80 |
|
81 public: //Static |
|
82 |
|
83 /** |
|
84 * A global logging function for 8 bit data. |
|
85 * |
|
86 * @param aCommand command to be handled |
|
87 */ |
|
88 static void WriteToLog( TRefByValue<const TDesC8> aFmt,... ); |
|
89 |
|
90 private: //Data |
|
91 |
|
92 TBool iConnected; |
|
93 }; |
|
94 |
|
95 #endif //__CMSCLIENT_H__ |
|
96 |
|
97 |
|
98 |