|
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 #ifndef CFOTASRVSESSION_H |
|
19 #define CFOTASRVSESSION_H |
|
20 |
|
21 // INCLUDES |
|
22 |
|
23 #include <fotaengine.h> |
|
24 #include "FotaServer.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 /** |
|
28 * Fotaserver's session class |
|
29 * |
|
30 * @lib fotaserver.exe |
|
31 * @since S60 v3.1 |
|
32 */ |
|
33 class CFotaSrvSession : public CSession2 |
|
34 { |
|
35 public: |
|
36 |
|
37 CFotaSrvSession(); |
|
38 |
|
39 /** |
|
40 * C++ Destructor |
|
41 */ |
|
42 virtual ~CFotaSrvSession(); |
|
43 |
|
44 /** |
|
45 * Getter for fotaserver |
|
46 * |
|
47 * @since S60 v3.1 |
|
48 * @param None |
|
49 * @return Fotaserver |
|
50 */ |
|
51 CFotaServer* FotaServer() const; |
|
52 |
|
53 public: |
|
54 // new functions |
|
55 |
|
56 /** |
|
57 * Checks client secure id (dmhostserver,fotaserver,fotatester) |
|
58 * |
|
59 * @since S60 v3.1 |
|
60 * @param Message containing client details |
|
61 * @return is it fotaserver |
|
62 */ |
|
63 static TFotaClient CheckClientSecureIdL(const RMessage2& aMessage); |
|
64 |
|
65 protected: |
|
66 |
|
67 /** |
|
68 * service client request |
|
69 * |
|
70 * @since S60 v3.1 |
|
71 * @param aMessage message containing client request details |
|
72 * @return None |
|
73 */ |
|
74 void ServiceL(const RMessage2& aMessage); |
|
75 |
|
76 /** |
|
77 * Called from ServiceL to handle the request |
|
78 * @param aMessage |
|
79 * @return None |
|
80 */ |
|
81 void DispatchMessageL(const RMessage2& aMessage); |
|
82 |
|
83 |
|
84 /** |
|
85 * Handle service error |
|
86 * |
|
87 * @since S60 v3.1 |
|
88 * @param aMessage Msg that resulted in error |
|
89 * @param aError Error code |
|
90 * @return None |
|
91 */ |
|
92 void ServiceError(const RMessage2& aMessage, TInt aError); |
|
93 |
|
94 private: |
|
95 /** |
|
96 * Error caught while writing data into FS |
|
97 */ |
|
98 TInt iError; |
|
99 |
|
100 }; |
|
101 |
|
102 #endif |