|
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: This class declares the interface of class CDRMClockSession and |
|
15 * passes the calls to the DRMClock |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CDRMCLOCKSESSION_H |
|
21 #define CDRMCLOCKSESSION_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "DRMClock.h" |
|
26 |
|
27 // CONSTANTS |
|
28 // MACROS |
|
29 // FUNCTION PROTOTYPES |
|
30 // DATA TYPES |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 |
|
34 // CLASS DECLARATION |
|
35 class RMessage2; |
|
36 |
|
37 /** |
|
38 * Server side instance of DRM Clock session. |
|
39 * This class is the server side instance of C/S communications of a certain |
|
40 * session. |
|
41 * |
|
42 * @lib DRMCommon.dll |
|
43 * @since S60Rel2.6 |
|
44 */ |
|
45 NONSHARABLE_CLASS( CDRMClockSession ) : public CSession2 |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 * |
|
52 * @since S60Rel2.6 |
|
53 * @param aClock a pointer to an instance of CDRMClock |
|
54 * @return New session instance. |
|
55 */ |
|
56 static CDRMClockSession* NewL( CDRMClock* aClock ); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 * @since S60Rel2.6 |
|
61 */ |
|
62 virtual ~CDRMClockSession(); |
|
63 |
|
64 public: // New functions |
|
65 |
|
66 |
|
67 public: // Functions from base classes |
|
68 |
|
69 /** |
|
70 * From CSession: Handles the service request event. |
|
71 * @since S60Rel2.6 |
|
72 * @param aMessage The message related to the event. |
|
73 * @exception Method leaves with appropriate exception value |
|
74 * if any errors occured. |
|
75 */ |
|
76 void ServiceL( const RMessage2& aMessage ); |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * C++ constructor. |
|
82 * @since S60Rel2.6 |
|
83 * @param aClock a pointer to an instance of CDRMClock |
|
84 */ |
|
85 CDRMClockSession( CDRMClock* aClock); |
|
86 |
|
87 /** |
|
88 * Second phase constructor. |
|
89 * @since S60Rel2.6 |
|
90 */ |
|
91 void ConstructL(); |
|
92 |
|
93 /** |
|
94 * ServiceL() runs DispatchL() under TRAP harness, so |
|
95 * all errors can be catched properly. DispatchL() then calls |
|
96 * appropriate private method depending on the request. |
|
97 * @since S60Rel2.6 |
|
98 * @param aMessage The message associated to the event. |
|
99 */ |
|
100 void DispatchL( const RMessage2& aMessage ); |
|
101 |
|
102 /** |
|
103 * Helper function for DispatchL(). |
|
104 * @since S60Rel2.6 |
|
105 * @param aMessage The message associated to the event. |
|
106 */ |
|
107 void GetDRMTimeL( const RMessage2& aMessage ); |
|
108 |
|
109 |
|
110 /** |
|
111 * Helper function for DispatchL(). |
|
112 * @since S60Rel2.6 |
|
113 * @param aMessage The message associated to the event. |
|
114 */ |
|
115 void UpdateDRMTimeL( const RMessage2& aMessage ); |
|
116 |
|
117 |
|
118 // Prohibit copy constructor. |
|
119 CDRMClockSession( const CDRMClockSession& ); |
|
120 // Prohibit assigment operator. |
|
121 CDRMClockSession& operator=( const CDRMClockSession& ); |
|
122 |
|
123 private: // Data |
|
124 CDRMClock* iDRMClock; |
|
125 }; |
|
126 |
|
127 |
|
128 #endif // CDRMCLOCKSESSION_H |
|
129 |
|
130 // End of File |