|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef SETDRMPROTECTEDCI_H |
|
17 #define SETDRMPROTECTEDCI_H |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <mmf/common/mmfipc.h> |
|
21 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
22 #include <mmf/common/mmfipcserver.h> |
|
23 #endif |
|
24 #include <mmf/server/mmfdevsoundcustominterface.h> |
|
25 #include <mmf/server/mmfdevsoundcustomcommands.h> |
|
26 #include <mmf/server/devsoundstandardcustominterfaces.h> |
|
27 #include <mmf/plugin/mmfdevsoundcustominterface.hrh> |
|
28 |
|
29 /** |
|
30 @internalComponent |
|
31 @prototype |
|
32 @file |
|
33 */ |
|
34 enum TMMFDevSoundCISetDRMProtectedCommands |
|
35 { |
|
36 EMMFDevSoundCISetDRMProtected = 0 |
|
37 }; |
|
38 |
|
39 |
|
40 /** |
|
41 @internalComponent |
|
42 @prototype |
|
43 @file |
|
44 */ |
|
45 |
|
46 /** |
|
47 * CMMFSetDRMProtectedMux |
|
48 * |
|
49 * implementation of the Play back status custom interface pair |
|
50 */ |
|
51 class CMMFSetDRMProtectedMux : public CBase, |
|
52 public MMMFDevSoundCustomInterfaceMuxPlugin, |
|
53 public MMMFSetDRMProtected |
|
54 { |
|
55 public: |
|
56 |
|
57 // from MMMFDevSoundCustomInterfaceMuxPlugin |
|
58 /** |
|
59 Attempt to open the interface. |
|
60 @param aInterfaceId |
|
61 The UID of the interface to open. |
|
62 @return One of the system wide error codes |
|
63 */ |
|
64 virtual TInt OpenInterface(TUid aInterfaceId); |
|
65 |
|
66 /** |
|
67 Equivalent to destructor. Called to destroy plugin. |
|
68 */ |
|
69 virtual void Release(); |
|
70 /** |
|
71 Pass destructor key. |
|
72 Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation() |
|
73 @param aDestructorKey |
|
74 The Uid returned by REComSession::CreateImplementationL() or similar |
|
75 */ |
|
76 virtual void PassDestructorKey(TUid aDestructorKey); |
|
77 |
|
78 /** |
|
79 Complete construction. |
|
80 Pass additional values from the construction phase, used subsequently by the plugin. |
|
81 @param aCustomUtility |
|
82 The custom interface utility used by the plugin to communicate with the remote |
|
83 server side DeMux plugin |
|
84 */ |
|
85 virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceMuxUtility* aCustomUtility); |
|
86 |
|
87 /** |
|
88 Return the custom interface |
|
89 @param aInterfaceId |
|
90 The UID of the required custom interface |
|
91 @return the custom interface supported by this plugin |
|
92 */ |
|
93 virtual TAny* CustomInterface(TUid aInterfaceId); |
|
94 |
|
95 /** |
|
96 Instantiate a CI Mux class |
|
97 @return the pointer to the new class, cast to the Mux plugin mixin |
|
98 */ |
|
99 static MMMFDevSoundCustomInterfaceMuxPlugin* NewL(); |
|
100 |
|
101 // from MMMFSetDRMProtected |
|
102 /** |
|
103 @see MMMFSetDRMProtected |
|
104 */ |
|
105 virtual TInt MmsdpMarkDataAsDRMProtected(TBool aDRMProtected); |
|
106 |
|
107 protected: |
|
108 CMMFSetDRMProtectedMux(); |
|
109 ~CMMFSetDRMProtectedMux(); |
|
110 |
|
111 protected: |
|
112 TUid iDestructorKey; |
|
113 TInt iRemoteHandle; |
|
114 MMMFDevSoundCustomInterfaceMuxUtility* iUtility; |
|
115 }; |
|
116 |
|
117 |
|
118 /** |
|
119 @internalComponent |
|
120 @prototype |
|
121 @file |
|
122 */ |
|
123 |
|
124 /** |
|
125 * CMMFSetDRMProtectedDeMux - DeMux side of pair |
|
126 */ |
|
127 |
|
128 class CMMFSetDRMProtectedDeMux : public CBase, |
|
129 public MMMFDevSoundCustomInterfaceDeMuxPlugin |
|
130 { |
|
131 public: |
|
132 /** |
|
133 Instantiate a CMMFSetDRMProtectedDeMux class |
|
134 @return a pointer to the new class cast to the DeMux plugin mixin |
|
135 */ |
|
136 static MMMFDevSoundCustomInterfaceDeMuxPlugin* NewL(); |
|
137 |
|
138 /** |
|
139 Attempt to open the interface. |
|
140 @param aInterfaceId |
|
141 The UID of the interface to open. |
|
142 @return a handle to the remote plugin |
|
143 */ |
|
144 virtual TInt OpenInterface(TUid aInterfaceId); |
|
145 |
|
146 /** |
|
147 Equivalent to destructor. Called to destroy plugin. |
|
148 */ |
|
149 virtual void Release(); |
|
150 /** |
|
151 Pass destructor key. |
|
152 Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation() |
|
153 @param aDestructorKey |
|
154 The Uid returned by REComSession::CreateImplementationL() or similar |
|
155 */ |
|
156 virtual void PassDestructorKey(TUid aDestructorKey); |
|
157 |
|
158 /** |
|
159 Set the target of the custom interface call |
|
160 @param aTarget |
|
161 The DevSound to call the custom interface on. |
|
162 */ |
|
163 virtual void SetInterfaceTarget(MMMFDevSoundCustomInterfaceTarget* aTarget); |
|
164 |
|
165 /** |
|
166 Complete construction. |
|
167 @param aUtility |
|
168 The DeMux utility to use |
|
169 */ |
|
170 virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceDeMuxUtility* aUtility); |
|
171 |
|
172 /** |
|
173 Refresh the current custom interface connections |
|
174 */ |
|
175 virtual void RefreshL(); |
|
176 |
|
177 // from MMMFDevSoundCustomInterfaceDeMuxPlugin |
|
178 /** |
|
179 Open the slave |
|
180 @param aInterface |
|
181 The UID of the requested interface |
|
182 @param aPackageBuf |
|
183 A package of data that can be supplied for initialisation |
|
184 @return the result of the operation |
|
185 */ |
|
186 virtual TInt DoOpenSlaveL(TUid aInterface, const TDesC8& aPackageBuf); |
|
187 |
|
188 /** |
|
189 Close the slave |
|
190 @param aHandle |
|
191 The handle of the slave plugin |
|
192 */ |
|
193 virtual void DoCloseSlaveL(TInt aHandle); |
|
194 |
|
195 // original RMessage is supplied so that remote demux plugin can extract necessary details |
|
196 // using DeMux utility |
|
197 |
|
198 /** |
|
199 Relay the synchronous custom command onto the slave |
|
200 @param aMessage |
|
201 The IPC message to be sent to the slave |
|
202 @return the result of the operation |
|
203 */ |
|
204 virtual TInt DoSendSlaveSyncCommandL(const RMmfIpcMessage& aMessage); |
|
205 |
|
206 /** |
|
207 Relay the synchronous custom command onto the slave and obtain a result |
|
208 @param aMessage |
|
209 The IPC message to be sent to the slave |
|
210 @return the result of the operation |
|
211 */ |
|
212 virtual TInt DoSendSlaveSyncCommandResultL(const RMmfIpcMessage& aMessage); |
|
213 |
|
214 /** |
|
215 Relay an asynchronous command onto the slave |
|
216 @param aMessage |
|
217 The IPC message to be sent to the slave |
|
218 */ |
|
219 virtual void DoSendSlaveAsyncCommandL(const RMmfIpcMessage& aMessage); |
|
220 |
|
221 /** |
|
222 Relay an asynchronous command onto the slave and obtain a result |
|
223 @param aMessage |
|
224 The IPC message to be sent to the slave@param aMessage |
|
225 */ |
|
226 virtual void DoSendSlaveAsyncCommandResultL(const RMmfIpcMessage& aMessage); |
|
227 |
|
228 protected: |
|
229 ~CMMFSetDRMProtectedDeMux(); |
|
230 CMMFSetDRMProtectedDeMux(); |
|
231 |
|
232 // mirrors MMMFSetDRMProtected method. |
|
233 TInt DoMmsdpMarkDataAsDRMProtected(TBool aDRMProtected); |
|
234 |
|
235 protected: |
|
236 MMMFDevSoundCustomInterfaceDeMuxUtility* iUtility; |
|
237 MMMFDevSoundCustomInterfaceTarget* iTarget; |
|
238 TUid iDestructorKey; |
|
239 MMMFSetDRMProtected* iInterfaceSetDRMProtected; |
|
240 }; |
|
241 |
|
242 #endif |