|
1 /* |
|
2 * Copyright (c) 2005-2006 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: DRM Play ClientServer |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __DRMPLAYCLIENTSERVER_H |
|
19 #define __DRMPLAYCLIENTSERVER_H |
|
20 |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <mmf/common/mmfstandardcustomcommands.h> |
|
24 |
|
25 |
|
26 |
|
27 // server name |
|
28 _LIT(KDRMPlayServerName,"DRMPlayServer"); |
|
29 _LIT(KDRMPlayServerImg,"DRMPlayServer"); // DLL/EXE name |
|
30 |
|
31 const TUid KDRMPlayServerUid3={0x1020381D}; |
|
32 |
|
33 const TUid KUidCustomInterfaceBuilder = {0x10200017}; // This should match \s60\mw\mmenhs\inc\CustomInterfaceBuilderTypes.h |
|
34 const TUid KUidAudioOutput = {0x10200018}; // This should match \s60\mw\mmenhs\inc\AudioOutputMessageTypes.h |
|
35 |
|
36 #ifdef __MYSERVER_NO_PROCESSES__ |
|
37 const TInt KDRMPlayServerStackSize=0x2000; // 8KB |
|
38 const TInt KDRMPlayServerInitHeapSize=0x1000; // 4KB |
|
39 const TInt KDRMPlayServerMaxHeapSize=0x1000000; // 16MB |
|
40 #endif |
|
41 |
|
42 |
|
43 const TUint KDRMPlayServMajorVersionNumber=0; |
|
44 const TUint KDRMPlayServMinorVersionNumber=1; |
|
45 const TUint KDRMPlayServBuildVersionNumber=1; |
|
46 |
|
47 |
|
48 |
|
49 // opcodes used in message passing between client and server |
|
50 enum TDRMPlayServRqst |
|
51 { |
|
52 EDRMPlayServCreate, |
|
53 EDRMPlayServNewFilePlayerL, |
|
54 EDRMPlayServNewDesPlayerL, |
|
55 EDRMPlayServNewDesPlayerReadOnlyL, |
|
56 EDRMPlayServNewPlayerL, |
|
57 EDRMPlayServOpenFile, |
|
58 EDRMPlayServOpenFileByHandle, |
|
59 EDRMPlayServOpenFileBySource, |
|
60 EDRMPlayServOpenDes, |
|
61 EDRMPlayServOpenUrl, |
|
62 EDRMPlayServPlay, |
|
63 EDRMPlayServStop, |
|
64 EDRMPlayServSetVolume, |
|
65 EDRMPlayServSetRepeats, |
|
66 EDRMPlayServSetVolumeRamp, |
|
67 EDRMPlayServDuration, |
|
68 EDRMPlayServMaxVolume, |
|
69 EDRMPlayServPause, |
|
70 EDRMPlayServClose, |
|
71 EDRMPlayServGetPosition, |
|
72 EDRMPlayServSetPosition, |
|
73 EDRMPlayServSetPriority, |
|
74 EDRMPlayServGetVolume, |
|
75 EDRMPlayServGetNumberOfMetaDataEntries, |
|
76 EDRMPlayServGetMetaDataEntry, |
|
77 EDRMPlayServClearPlayWindow, |
|
78 EDRMPlayServSetPlayWindow, |
|
79 EDRMPlayServSetBalance, |
|
80 EDRMPlayServGetBalance, |
|
81 EDRMPlayServGetBitRate, |
|
82 EDRMPlayServRegisterForAudioLoadingNotification, |
|
83 EDRMPlayServGetAudioLoadingProgress, |
|
84 EDRMPlayServControllerImplementationInformation, |
|
85 EDRMPlayServCustomCommandSyncWithReturn, |
|
86 EDRMPlayServCustomCommandSyncWithoutReturn, |
|
87 EDRMPlayServCustomCommandAsyncWithReturnStep1, |
|
88 EDRMPlayServCustomCommandAsyncWithReturnStep2, |
|
89 EDRMPlayServCustomCommandAsyncWithoutReturnStep1, |
|
90 EDRMPlayServCustomCommandAsyncWithoutReturnStep2, |
|
91 EDRMPlayServSetPriorityPreference |
|
92 }; |
|
93 |
|
94 enum TDRMPlayServLeave |
|
95 { |
|
96 ENonNumericString |
|
97 }; |
|
98 |
|
99 |
|
100 enum TAsyncCallbackState |
|
101 { |
|
102 ELoadingStarted, |
|
103 ELoadingComplete, |
|
104 EInitComplete, |
|
105 EPlayComplete, |
|
106 ECustomCommandCompleteNoData, |
|
107 ECustomCommandComplete |
|
108 }; |
|
109 |
|
110 typedef TPckgBuf<TAsyncCallbackState> TAsyncCallbackStatePckgBuf; |
|
111 struct TErrorDurationStruct |
|
112 { |
|
113 TInt iError; |
|
114 TTimeIntervalMicroSeconds iDuration; |
|
115 }; |
|
116 |
|
117 typedef TPckgBuf<TErrorDurationStruct> TErrorDurationStructPckgBuf; |
|
118 |
|
119 class TDRMCustomCommand |
|
120 { |
|
121 public: |
|
122 TDRMCustomCommand(){}; |
|
123 ~TDRMCustomCommand(){}; |
|
124 TMMFMessageDestinationPckg iDestination; |
|
125 TInt iFunction; |
|
126 TRequestStatus iRequestStatus; |
|
127 TAsyncCallbackStatePckgBuf iAsyncCallback; |
|
128 }; |
|
129 |
|
130 typedef TPckgBuf<TDRMCustomCommand> TPckgCustomCommand; |
|
131 |
|
132 struct TDataStruct |
|
133 { |
|
134 TBuf<100> iFileName; |
|
135 TBuf8<100> iData; |
|
136 TInt iPriority; |
|
137 TMdaPriorityPreference iPref; |
|
138 }; |
|
139 typedef TPckgBuf<TDataStruct> TDataStructPckgBuf; |
|
140 |
|
141 struct TUrlStruct |
|
142 { |
|
143 TBuf<100> iUrl; |
|
144 TInt iIapId; |
|
145 TBuf8<100> iMimeType; |
|
146 }; |
|
147 |
|
148 class TPlayWindowStruct |
|
149 { |
|
150 public: |
|
151 TTimeIntervalMicroSeconds iPlayStart; |
|
152 TTimeIntervalMicroSeconds iPlayEnd; |
|
153 }; |
|
154 |
|
155 typedef TPckgBuf<TPlayWindowStruct> TPlayWindowStructBuf; |
|
156 |
|
157 class TSetPositionStruct |
|
158 { |
|
159 public: |
|
160 TTimeIntervalMicroSeconds iPosition; |
|
161 }; |
|
162 |
|
163 typedef TPckgBuf<TSetPositionStruct> TSetPositionStructBuf; |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 typedef TPckgBuf<TUrlStruct> TUrlStructPckgBuf; |
|
169 |
|
170 typedef TPckg<TDesC8> TPckgDesC8; |
|
171 typedef TPckg<TDesC> TPckgDesC; |
|
172 typedef TPckgBuf<TInt> TPckgBufTInt; |
|
173 typedef TPckg<TTimeIntervalMicroSeconds> TPckgTTimeIntervalMicroSeconds; |
|
174 typedef TPckgBuf<TTimeIntervalMicroSeconds> TPckgBufTTimeIntervalMicroSeconds; |
|
175 typedef TPckgBuf<TPtr8> TPckgBufTDes8; |
|
176 typedef TPckg<TRequestStatus> TPckgTRequestStatus; |
|
177 typedef TPckgBuf<TUint> TPckgBufTUint; |
|
178 typedef TPckgBuf<TMMSource> TPckgBufTMMSource; |
|
179 |
|
180 |
|
181 #endif |
|
182 |