|
1 /* |
|
2 * Copyright (c) 2007 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 client side class for DRMHelperServer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef RDRMHELPERCLIENT_H |
|
20 #define RDRMHELPERCLIENT_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <caf/caftypes.h> |
|
25 |
|
26 #include "drmutilitytypes.h" |
|
27 // DATA TYPES |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 |
|
34 using namespace DRM; |
|
35 |
|
36 /** |
|
37 * This class provides the client-side interface to the server session |
|
38 * |
|
39 * @since S60 4.0 |
|
40 */ |
|
41 |
|
42 class RDrmHelperClient : public RSessionBase |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * C++ default constructor. |
|
48 */ |
|
49 RDrmHelperClient(); |
|
50 |
|
51 public: // New functions |
|
52 |
|
53 /** |
|
54 * Connects to server. |
|
55 * @return System-wide error code |
|
56 */ |
|
57 TInt Connect(); |
|
58 |
|
59 /** |
|
60 * Gets the version number |
|
61 * @return version number |
|
62 */ |
|
63 TVersion Version() const; |
|
64 |
|
65 /** |
|
66 * Register the given content uri as an automated content. |
|
67 * @param aUri: content URI |
|
68 * @param aAutomatedType: type of automated content |
|
69 * @param aIntent: intent how content is used |
|
70 * @param aServiceType: active or passive registration |
|
71 * @return System-wide error code |
|
72 * @see ContentAccess::TIntent |
|
73 */ |
|
74 TInt SetAutomated( |
|
75 const TDesC8& aUri, |
|
76 const TDrmAutomatedType aAutomatedType, |
|
77 const ContentAccess::TIntent aIntent, |
|
78 const TDrmAutomatedServiceType aServiceType ) const; |
|
79 |
|
80 /** |
|
81 * Unregister the given content. |
|
82 * @param aUri: content URI |
|
83 * @param aServiceType: active or passive registration |
|
84 * @param aAutomatedType: type of automated content |
|
85 * @param aIntent: intent how content is used |
|
86 * @return System-wide error code |
|
87 * @see ContentAccess::TIntent |
|
88 */ |
|
89 TInt RemoveAutomated( |
|
90 const TDesC8& aUri, |
|
91 const TDrmAutomatedType aAutomatedType, |
|
92 const ContentAccess::TIntent aIntent, |
|
93 const TDrmAutomatedServiceType aServiceType ) const; |
|
94 |
|
95 /** |
|
96 * Unregister all instances of the given content. |
|
97 * @param aUri: content URI |
|
98 * @param aServiceType: active or passive registration |
|
99 * @param aAutomatedType: type of automated content |
|
100 * @param aIntent: intent how content is used |
|
101 * @return System-wide error code |
|
102 * @see ContentAccess::TIntent |
|
103 */ |
|
104 TInt RemoveAutomatedAll( |
|
105 const TDesC8& aUri, |
|
106 const TDrmAutomatedType aAutomatedType, |
|
107 const ContentAccess::TIntent aIntent, |
|
108 const TDrmAutomatedServiceType aServiceType ) const; |
|
109 /*(const TDesC8& aUri, |
|
110 TBool aActive, |
|
111 TInt aAutomatedType, |
|
112 TInt aIntent ) const;*/ |
|
113 |
|
114 /** |
|
115 * Indicate that idle-screen has been activated. |
|
116 * @return System-wide error code |
|
117 */ |
|
118 TInt IndicateIdle() const; |
|
119 |
|
120 private: |
|
121 |
|
122 /** |
|
123 * Has given content been registered as automated content. |
|
124 * @param aUri content URI of the content |
|
125 * @param aAutomated (out) ETrue if registered as automated. |
|
126 * @param aType (out) Tells whether content has been |
|
127 * registered as active or passive. |
|
128 * @return System-wide error code |
|
129 * @see ContentAccess::TIntent |
|
130 */ |
|
131 TInt IsAutomated( |
|
132 const TDesC8& aUri, |
|
133 const TDrmAutomatedType aAutomatedType, |
|
134 const ContentAccess::TIntent aIntent, |
|
135 const TDrmAutomatedServiceType aServiceType, |
|
136 TBool& aAutomated ) const; |
|
137 |
|
138 TInt StartServer(); |
|
139 TInt CreateServerProcess(); |
|
140 }; |
|
141 |
|
142 |
|
143 |
|
144 #endif // RDRMHELPERCLIENT_H |
|
145 |
|
146 // End of File |