|
1 /* |
|
2 * Copyright (c) 2003 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 is the client side handle of DRM Clock Server |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef RDRMCLOCKCLIENT_H |
|
21 #define RDRMCLOCKCLIENT_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <DrmTypes.h> |
|
26 //#include "DRMClock.h" |
|
27 |
|
28 // CONSTANTS |
|
29 // MACROS |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 // FUNCTION PROTOTYPES |
|
34 // FORWARD DECLARATIONS |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * This class is the client side interface for DRM Clock Server. |
|
40 * |
|
41 * @lib DRM Core |
|
42 * @since S60 Release 2.5 |
|
43 */ |
|
44 NONSHARABLE_CLASS( RDRMClockClient ) : public RSessionBase |
|
45 { |
|
46 public: // Constructor & destructor |
|
47 /** |
|
48 * C++ default constructor. |
|
49 */ |
|
50 IMPORT_C RDRMClockClient(); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 IMPORT_C virtual ~RDRMClockClient(); |
|
56 |
|
57 /** |
|
58 * This method opens the connection between the client and the server. |
|
59 * @since 2.5 |
|
60 * @return Error code. KErrNone if the operation is successful. |
|
61 */ |
|
62 IMPORT_C TInt Connect(); |
|
63 |
|
64 /** |
|
65 * This function closes the connection between the client and the server. |
|
66 * It is safe to call this method even if connection is not established. |
|
67 * @since S60Rel2.5 |
|
68 */ |
|
69 IMPORT_C void Close(); |
|
70 |
|
71 public: // New functions |
|
72 |
|
73 /** |
|
74 * Get the secure time. |
|
75 * @since 2.6 |
|
76 * @param aTime Output parameter containing the |
|
77 * secure time in UTC. |
|
78 * @param aTimeZone Time zone information including summer/winter time |
|
79 * in +/- 15 minutes |
|
80 * @param aSecurityLevel Output parameter Securiry level. |
|
81 * @return Symbian OS error code if any. |
|
82 */ |
|
83 IMPORT_C TInt GetSecureTime( TTime& aTime, |
|
84 TInt& aTimeZone, |
|
85 DRMClock::ESecurityLevel& aSecurityLevel ) const; |
|
86 |
|
87 /** |
|
88 * Update the secure time. |
|
89 * @since 2.6 |
|
90 * @param aTime Input parameter containing the |
|
91 * secure time in UTC. |
|
92 * @param aTimeZone Time zone information including summer/winter time |
|
93 * in +/- 15 minutes |
|
94 * @return Symbian OS error code if any. |
|
95 */ |
|
96 IMPORT_C TInt UpdateSecureTime( const TTime& aTime, const TInt& aTimeZone ); |
|
97 |
|
98 |
|
99 public: // Functions from base classes |
|
100 |
|
101 protected: // New functions |
|
102 |
|
103 protected: // Functions from base classes |
|
104 |
|
105 private: |
|
106 // Prohibit copy constructor if not deriving from CBase. |
|
107 RDRMClockClient( const RDRMClockClient& ); |
|
108 // Prohibit assigment operator if not deriving from CBase. |
|
109 RDRMClockClient& operator=( const RDRMClockClient& ); |
|
110 |
|
111 public: // Data |
|
112 |
|
113 protected: // Data |
|
114 |
|
115 private: // Data |
|
116 |
|
117 public: // Friend classes |
|
118 |
|
119 protected: // Friend classes |
|
120 |
|
121 private: // Friend classes |
|
122 }; |
|
123 |
|
124 #endif // RDRMCLOCKCLIENT_H |
|
125 |
|
126 // End of File |