|
1 /* |
|
2 * Copyright (c) 2004 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: the server session implementation of DRM Helper |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef DRMHELPERSESSION_H |
|
20 #define DRMHELPERSESSION_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 // DATA TYPES |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 /** |
|
34 * Server session of DRM Helper |
|
35 * This class is the server side instance of C/S communications of a certain |
|
36 * session. |
|
37 * |
|
38 * @lib DRMHelperServer.exe |
|
39 * @since S60Rel2.6 |
|
40 */ |
|
41 class CDRMHelperSession : public CSession2 |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * @since S60Rel2.6 |
|
48 * @param aClient Associated client side thread. |
|
49 * @return New session instance. |
|
50 */ |
|
51 static CDRMHelperSession* NewL(); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 * @since S60Rel2.6 |
|
56 */ |
|
57 virtual ~CDRMHelperSession(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 public: // Functions from base classes |
|
62 |
|
63 /** |
|
64 * From CSession: Handles the service request event. |
|
65 * @since S60Rel2.6 |
|
66 * @param aMessage The message related to the event. |
|
67 * @exception Method leaves with appropriate exception value |
|
68 * if any errors occured. |
|
69 */ |
|
70 void ServiceL( const RMessage2& aMessage ); |
|
71 |
|
72 protected: // New functions |
|
73 |
|
74 protected: // Functions from base classes |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * C++ constructor. |
|
80 * @since S60Rel2.6 |
|
81 * @param aClient Client thread. |
|
82 * |
|
83 */ |
|
84 CDRMHelperSession(); |
|
85 |
|
86 |
|
87 /** |
|
88 * ServiceL() runs DispatchL() under TRAP harness, so |
|
89 * all errors can be catched properly. DispatchL() then calls |
|
90 * appropriate private method depending on the request. |
|
91 * @since S60Rel2.6 |
|
92 * @param aMessage The message associated to the event. |
|
93 */ |
|
94 void DispatchL( const RMessage2& aMessage ); |
|
95 |
|
96 /** |
|
97 * RegisterL register the automated content into server |
|
98 * @since S60Rel2.6 |
|
99 * @param aMessage The message associated to the event. |
|
100 */ |
|
101 void RegisterL( const RMessage2& aMessage ); |
|
102 |
|
103 |
|
104 /** |
|
105 * IsRegisteredL check if the automated content is registered into server |
|
106 * @since S60Rel2.6 |
|
107 * @param aMessage The message associated to the event. |
|
108 */ |
|
109 void IsRegisteredL( const RMessage2& aMessage ); |
|
110 |
|
111 |
|
112 /** |
|
113 * RemoveL remove the automated content from server |
|
114 * @since S60Rel2.6 |
|
115 * @param aMessage The message associated to the event. |
|
116 */ |
|
117 void RemoveL( const RMessage2& aMessage ); |
|
118 |
|
119 |
|
120 /** |
|
121 * IndicateIdleL indicate the ilde time comes |
|
122 * @since S60Rel2.6 |
|
123 * @param aMessage The message associated to the event. |
|
124 */ |
|
125 void IndicateIdleL( const RMessage2& aMessage ); |
|
126 |
|
127 // Prohibit copy constructor. |
|
128 CDRMHelperSession( const CDRMHelperSession& ); |
|
129 // Prohibit assigment operator. |
|
130 CDRMHelperSession& operator=( const CDRMHelperSession& ); |
|
131 |
|
132 public: // Data |
|
133 protected: // Data |
|
134 private: // Data |
|
135 public: // Friend classes |
|
136 protected: // Friend classes |
|
137 private: // Friend classes |
|
138 |
|
139 }; |
|
140 |
|
141 |
|
142 |
|
143 #endif // DRMHELPERSESSION_H |
|
144 |
|
145 // End of File |