Support unrar64.dll
[xy_vsfilter.git] / include / realmedia / rmadtcvt.h
blob042436151a49b01e59eb4015e984eca3425cb66b
1 /****************************************************************************
2 *
3 * $Id: rmadtcvt.h 7 2003-05-30 02:18:02Z gabest $
5 * Copyright (C) 1995-2000 RealNetworks, Inc. All rights reserved..
6 *
7 * http://www.real.com/devzone
9 * This program contains proprietary
10 * information of Progressive Networks, Inc, and is licensed
11 * subject to restrictions on use and distribution.
14 * RealMedia Architecture Stream Data Conversion Interfaces.
19 #ifndef _RMADTCVT_H
20 #define _RMADTCVT_H
22 typedef _INTERFACE IRMADataConvertSystemObject
23 IRMADataConvertSystemObject;
24 typedef _INTERFACE IRMADataConvert IRMADataConvert;
25 typedef _INTERFACE IRMADataConvertResponse IRMADataConvertResponse;
26 typedef _INTERFACE IRMADataRevert IRMADataRevert;
27 typedef _INTERFACE IRMADataRevertResponse IRMADataRevertResponse;
29 /****************************************************************************
31 * Interface:
33 * IRMADataConvertSystemObject
35 * Purpose:
37 * Object that allows Controller to communicate with a specific
38 * Data Convert plugin session (similar to IRMAFileSystemObject)
40 * Implemented by:
42 * Server side plugin.
44 * IID_IMADataConvertSystemObject:
46 * {00003900-0901-11d1-8B06-00A024406D59}
49 DEFINE_GUID(IID_IRMADataConvertSystemObject,
50 0x00003900, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
52 #undef INTERFACE
53 #define INTERFACE IRMADataConvertSystemObject
55 DECLARE_INTERFACE_(IRMADataConvertSystemObject, IUnknown)
58 * IUnknown methods
60 STDMETHOD(QueryInterface) (THIS_
61 REFIID riid,
62 void** ppvObj) PURE;
64 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
66 STDMETHOD_(ULONG,Release) (THIS) PURE;
69 * IRMADataConvertSystemObject
72 /***********************************************************************
73 * Method: GetDataConvertInfo
75 * Purpose:
76 * Returns information needed for proper instantiation of data
77 * convert plugin. pShortName should be a short, human readable
78 * name in the form of "company-dcname". For example:
79 * pShortName = "rn-dataconvert"
81 STDMETHOD(GetDataConvertInfo) (THIS_ REF(const char*) pShortName) PURE;
83 /***********************************************************************
84 * Method: InitDataConvertSystem
86 * Purpose:
87 * Pass in options from config file from under DataConvertMount
88 * for this specific plugin.
90 STDMETHOD(InitDataConvertSystem) (THIS_ IRMAValues* pOptions) PURE;
92 /***********************************************************************
93 * Method: CreateDataConvert
95 * Purpose:
96 * Purpose:
97 * System is requesting an IRMADataConvert object for this mount
98 * point.
100 STDMETHOD(CreateDataConvert) (THIS_ IUnknown** /*OUT*/ ppConvObj) PURE;
104 /****************************************************************************
106 * Interface:
108 * IRMADataConvert
110 * Purpose:
112 * Per connection object to handle the actual data and header
113 * conversions.
115 * Implemented by:
117 * Server side plugin.
119 * IID_IMADataConvert:
121 * {00003901-0901-11d1-8B06-00A024406D59}
124 DEFINE_GUID(IID_IRMADataConvert,
125 0x00003901, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
127 #undef INTERFACE
128 #define INTERFACE IRMADataConvert
130 DECLARE_INTERFACE_(IRMADataConvert, IUnknown)
133 * IUnknown methods
135 STDMETHOD(QueryInterface) (THIS_
136 REFIID riid,
137 void** ppvObj) PURE;
139 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
141 STDMETHOD_(ULONG,Release) (THIS) PURE;
144 * IRMADataConvert
148 * NOTE: for each of ConvertFileHeader, ConvertStreamHeader,
149 * ConvertData, you can call the appropriate done method on
150 * the response object with a result of PNR_OK and a NULL buffer
151 * and the system will use the original header/packet. Do this
152 * if you aren't going to change things in the header/packet.
154 /************************************************************************
155 * Method: DataConvertInit
157 *Purpose:
158 * Basic initialization, mainly just to pass in response object.
160 STDMETHOD(DataConvertInit) (THIS_ IRMADataConvertResponse* pResponse) PURE;
162 /************************************************************************
163 * Method: ConvertFileHeader
165 * Purpose:
166 * Pass in file headers for data conversion.
168 STDMETHOD(ConvertFileHeader) (THIS_ IRMAValues* pFileHeader) PURE;
170 /************************************************************************
171 * Method: ConvertStreamHeader
173 * Purpose:
174 * Pass in stream headers for data conversion.
176 STDMETHOD(ConvertStreamHeader) (THIS_ IRMAValues* pStreamHeader) PURE;
178 /************************************************************************
179 * Method: GetConversionMimeType
181 * Purpose:
182 * Tell the server what converstion type you are using for the
183 * session.
185 STDMETHOD(GetConversionMimeType)
186 (THIS_ REF(const char*) pConversionType) PURE;
188 /************************************************************************
189 * Method: ConvertData
191 * Purpose:
192 * Pass in data to be converted.
194 STDMETHOD(ConvertData) (THIS_ IRMAPacket* pPacket) PURE;
196 /************************************************************************
197 * Method: ControlBufferReady
199 * Purpose:
200 * Pass in a control channel buffer sent from the IRMADataRevert
201 * on the other side (player).
203 STDMETHOD(ControlBufferReady) (THIS_ IRMABuffer* pBuffer) PURE;
205 /************************************************************************
206 * Method: SetMulticastTransportConverter
208 * Purpose:
209 * In this case the IRMADataConvert is only handling the header
210 * conversions per player and this call is handing you the data
211 * converter which is doing the data. This will a different
212 * instance of the same object.
214 STDMETHOD(SetMulticastTransportConverter) (THIS_
215 IRMADataConvert* pConverter) PURE;
218 /************************************************************************
219 * Method: AddMulticastControlConverter
221 * Purpose:
222 * In this case the IRMADataConvert is only handling the data
223 * conversions for all of the players (but only once because it's
224 * multicast). This call is handing you one of a possible many
225 * IRMADataConvert objects which will be handling the header
226 * conversions.
228 STDMETHOD(AddMulticastControlConverter) (THIS_
229 IRMADataConvert* pConverter) PURE;
231 /************************************************************************
232 * Method: Done
234 * Purpose:
235 * Let IRMADataConvert know that it is done. This is mainly to clear
236 * circular refs between multicast transport and controllers.
238 STDMETHOD(Done) (THIS) PURE;
242 /****************************************************************************
244 * Interface:
246 * IRMADataConvertResponse
248 * Purpose:
250 * Response object for IRMADataConvert.
252 * Implemented by:
254 * Server Core.
256 * IID_IMADataConvertResponse:
258 * {00003902-0901-11d1-8B06-00A024406D59}
261 DEFINE_GUID(IID_IRMADataConvertResponse,
262 0x00003902, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
264 #undef INTERFACE
265 #define INTERFACE IRMADataConvertResponse
267 DECLARE_INTERFACE_(IRMADataConvertResponse, IUnknown)
270 * IUnknown methods
272 STDMETHOD(QueryInterface) (THIS_
273 REFIID riid,
274 void** ppvObj) PURE;
276 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
278 STDMETHOD_(ULONG,Release) (THIS) PURE;
281 * IRMADataConvertResponse
285 * NOTE: for each of ConvertFileHeader, ConvertStreamHeader,
286 * ConvertData, you can call the appropriate done method on
287 * the response object with a result of PNR_OK and a NULL buffer
288 * and the system will use the original header/packet. Do this
289 * if you aren't going to change things in the header/packet.
291 /************************************************************************
292 * Method: DataConvertInitDone
294 * Purpose:
295 * Async notification that the IRMADataConvert is done with
296 * intialization.
298 STDMETHOD(DataConvertInitDone) (THIS_ PN_RESULT status) PURE;
300 /************************************************************************
301 * Method: ConvertedFileHeaderReady
303 * Purpose:
304 * Async notification that the IRMADataCovert is done converting the
305 * file header.
307 STDMETHOD(ConvertedFileHeaderReady) (THIS_
308 PN_RESULT status, IRMAValues* pFileHeader) PURE;
310 /************************************************************************
311 * Method: ConvertedStreamHeaderReady
313 * Purpose:
314 * Async notification that the IRMADataConvert is done converting the
315 * stream header.
317 STDMETHOD(ConvertedStreamHeaderReady) (THIS_
318 PN_RESULT status, IRMAValues* pStreamHeader) PURE;
320 /************************************************************************
321 * Method: ConvertedDataReady
323 * Purpose:
324 * Async notification that the IRMADataConvert is done converting
325 * the stream data packet.
327 STDMETHOD(ConvertedDataReady) (THIS_ PN_RESULT status,
328 IRMAPacket* pPacket) PURE;
330 /************************************************************************
331 * Method: SendControlBuffer
333 * Purpose:
334 * Provided to allow IRMADataConvert to send an arbitrary buffer
335 * to the IRMADataRevert on the other side (player).
337 STDMETHOD(SendControlBuffer) (THIS_ IRMABuffer* pBuffer) PURE;
341 /****************************************************************************
343 * Interface:
345 * IRMADataRevert
347 * Purpose:
349 * Revert data coming from coresponding IRMADataConvert on server.
351 * Implemented by:
353 * Player side plugin.
355 * IID_IMADataRevert:
357 * {00003903-0901-11d1-8B06-00A024406D59}
360 DEFINE_GUID(IID_IRMADataRevert,
361 0x00003903, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
363 #undef INTERFACE
364 #define INTERFACE IRMADataRevert
366 DECLARE_INTERFACE_(IRMADataRevert, IUnknown)
369 * IUnknown methods
371 STDMETHOD(QueryInterface) (THIS_
372 REFIID riid,
373 void** ppvObj) PURE;
375 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
377 STDMETHOD_(ULONG,Release) (THIS) PURE;
380 * IRMADataRevert
383 /************************************************************************
384 * Method: DataRevertInit
386 * Purpose:
387 * Basic inialization of IRMADataRevert. Mainly just to pass in
388 * response object.
390 STDMETHOD(DataRevertInit) (THIS_ IRMADataRevertResponse* pResponse) PURE;
392 /************************************************************************
393 * Method: GetDataRevertInfo
395 * Purpose:
396 * Allow IRMADataRevert to notify player core about which data
397 * conversion mime types it is willing to handle.
399 STDMETHOD(GetDataRevertInfo) (THIS_ REF(const char**)
400 ppConversionMimeTypes) PURE;
402 /************************************************************************
403 * Method: RevertFileHeader
405 * Purpose:
406 * Pass in converted FileHeader to allow IRMADataRevert to revert
407 * the header.
409 STDMETHOD(RevertFileHeader) (THIS_ IRMAValues* pFileHeader) PURE;
411 /************************************************************************
412 * Method: RevertStreamHeader
414 * Purpose:
415 * Pass in converted StreamHeader to allow IRMADataRevert to revert
416 * the header.
418 STDMETHOD(RevertStreamHeader)(THIS_ IRMAValues* pStreamHeader) PURE;
420 /************************************************************************
421 * Method: RevertData
423 * Purpose:
424 * Pass in converted stream data to allow IRMADataRevert to
425 * revert the data.
427 STDMETHOD(RevertData) (THIS_ IRMAPacket* pPacket) PURE;
429 /************************************************************************
430 * Method: ControlBufferReady
432 * Purpose:
433 * Pass in control channel buffer received from corresponding
434 * IRMADataConvert on server side.
436 STDMETHOD(ControlBufferReady) (THIS_ IRMABuffer* pBuffer) PURE;
440 /****************************************************************************
442 * Interface:
444 * IRMADataRevertResponse
446 * Purpose:
448 * Response ojbect for IRMADataRevert.
450 * Implemented by:
452 * Player core.
454 * IID_IMADataRevertResponse:
456 * {00003904-0901-11d1-8B06-00A024406D59}
459 DEFINE_GUID(IID_IRMADataRevertResponse,
460 0x00003904, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
462 #undef INTERFACE
463 #define INTERFACE IRMADataRevertResponse
465 DECLARE_INTERFACE_(IRMADataRevertResponse, IUnknown)
468 * IUnknown methods
470 STDMETHOD(QueryInterface) (THIS_
471 REFIID riid,
472 void** ppvObj) PURE;
474 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
476 STDMETHOD_(ULONG,Release) (THIS) PURE;
479 * IRMADataRevertResponse
482 /************************************************************************
483 * Method: DataRevertInitDone
485 * Purpose:
486 * Async notification that the IRMADataRevert is done intializing
487 * and can begin processing headers.
489 STDMETHOD(DataRevertInitDone) (THIS_ PN_RESULT status) PURE;
491 /************************************************************************
492 * Method: RevertedFileHeaderReady
494 * Purpose:
495 * Async notification that the IRMADataRevert is done reverting the
496 * file headers.
498 STDMETHOD(RevertedFileHeaderReady) (THIS_
499 PN_RESULT status, IRMAValues* pHeader) PURE;
501 /************************************************************************
502 * Method: RevertedStreamHeaderReady
504 * Purpose:
505 * Async notification that the IRMADataRevert is done reverting the
506 * stream headers.
508 STDMETHOD(RevertedStreamHeaderReady) (THIS_
509 PN_RESULT status, IRMAValues* pHeader) PURE;
511 /************************************************************************
512 * Method: RevertedDataReady
514 * Purpose:
515 * Async notification that the IRMADataRevert is done reverting the
516 * stream data.
518 STDMETHOD(RevertedDataReady) (THIS_ PN_RESULT status,
519 IRMAPacket* pPacket) PURE;
521 /************************************************************************
522 * Method: SendControlBuffer
524 * Purpose:
525 * Provided to allow IRMADataRevert to send an arbitrary control
526 * buffer to the IRMADataConvert on the other side (server).
528 STDMETHOD(SendControlBuffer) (THIS_ IRMABuffer* pBuffer) PURE;
533 #endif