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