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: Represent client's session at serverside |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CFOTASRVSESSION_H |
|
21 #define CFOTASRVSESSION_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <eikdoc.h> |
|
25 #include <AknServerApp.h> |
|
26 #include <fotaengine.h> |
|
27 #include "FotaServer.h" |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Fotaserver's session class |
|
32 * |
|
33 * @lib fotaserver.exe |
|
34 * @since S60 v3.1 |
|
35 */ |
|
36 class CFotaSrvSession : public CAknAppServiceBase |
|
37 { |
|
38 public: |
|
39 |
|
40 enum TClient |
|
41 { |
|
42 EUnknown = 0, |
|
43 EDMHostServer = 1, |
|
44 EOMADMAppUi = 2, |
|
45 EFotaServer = 3, |
|
46 EStarter = 4, |
|
47 EFMSServer = 5, |
|
48 EFotaTestApp = 6, |
|
49 ESoftwareChecker = 7, |
|
50 ESoftwareCheckerBackground = 8 |
|
51 }; |
|
52 |
|
53 CFotaSrvSession( ); |
|
54 |
|
55 /** |
|
56 * C++ Destructor |
|
57 */ |
|
58 virtual ~CFotaSrvSession(); |
|
59 |
|
60 /** |
|
61 * Getter for fotaserver |
|
62 * |
|
63 * @since S60 v3.1 |
|
64 * @param None |
|
65 * @return Fotaserver |
|
66 */ |
|
67 CFotaServer* FotaServer() const; |
|
68 |
|
69 public: // new functions |
|
70 |
|
71 /** |
|
72 * Checks client secure id (dmhostserver,fotaserver,fotatester) |
|
73 * |
|
74 * @since S60 v3.1 |
|
75 * @param Message containing client details |
|
76 * @return is it fotaserver |
|
77 */ |
|
78 static TClient CheckClientSecureIdL (const RMessage2& aMessage); |
|
79 |
|
80 protected: // from CSession2 |
|
81 |
|
82 /** |
|
83 * CreateL |
|
84 * |
|
85 * @since S60 v3.1 |
|
86 * @param none |
|
87 * @return None |
|
88 */ |
|
89 void CreateL(); |
|
90 |
|
91 |
|
92 /** |
|
93 * service client request |
|
94 * |
|
95 * @since S60 v3.1 |
|
96 * @param aMessage message containing client request details |
|
97 * @return None |
|
98 */ |
|
99 void ServiceL( const RMessage2& aMessage ); |
|
100 |
|
101 |
|
102 /** |
|
103 * Handle service error |
|
104 * |
|
105 * @since S60 v3.1 |
|
106 * @param aMessage Msg that resulted in error |
|
107 * @param aError Error code |
|
108 * @return None |
|
109 */ |
|
110 void ServiceError( const RMessage2& aMessage, TInt aError ); |
|
111 |
|
112 private: |
|
113 /** |
|
114 * Error caught while writing data into FS |
|
115 */ |
|
116 TInt iError ; |
|
117 |
|
118 /** |
|
119 * document |
|
120 */ |
|
121 //CEikDocument* iDoc; |
|
122 }; |
|
123 |
|
124 |
|
125 #endif |
|