1 /****************************************************************************
3 * $Id: rmapckts.h 7 2003-05-30 02:18:02Z gabest $
5 * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
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 Packet and Header Interface.
21 // Define IRMAUtilities
23 /* ASMFlags in IRMAPacket */
24 #define RMA_ASM_SWITCH_ON 0x01
25 #define RMA_ASM_SWITCH_OFF 0x02
28 /****************************************************************************
36 * Basic opaque data storage buffer. Used in interfaces where
37 * object ownership is best managed through COM style reference
42 * {00001300-0901-11d1-8B06-00A024406D59}
45 DEFINE_GUID(IID_IRMABuffer
, 0x00001300, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
46 0xa0, 0x24, 0x40, 0x6d, 0x59);
49 * The IRMACommonClassFactory supports creating an instance
52 #define CLSID_IRMABuffer IID_IRMABuffer
55 #define INTERFACE IRMABuffer
57 DECLARE_INTERFACE_(IRMABuffer
, IUnknown
)
62 STDMETHOD(QueryInterface
) (THIS_
66 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
68 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
75 REF(ULONG32
) ulLength
) PURE
;
79 ULONG32 ulLength
) PURE
;
81 STDMETHOD(SetSize
) (THIS_
82 ULONG32 ulLength
) PURE
;
84 STDMETHOD_(ULONG32
,GetSize
) (THIS
) PURE
;
86 STDMETHOD_(UCHAR
*,GetBuffer
)(THIS
) PURE
;
90 /****************************************************************************
98 * Basic data packet in the RealMedia system.
102 * {00001301-0901-11d1-8B06-00A024406D59}
105 DEFINE_GUID(IID_IRMAPacket
, 0x00001301, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
106 0xa0, 0x24, 0x40, 0x6d, 0x59);
109 * The IRMACommonClassFactory supports creating an instance
112 #define CLSID_IRMAPacket IID_IRMAPacket
115 #define INTERFACE IRMAPacket
117 DECLARE_INTERFACE_(IRMAPacket
, IUnknown
)
122 STDMETHOD(QueryInterface
) (THIS_
126 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
128 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
133 STDMETHOD(Get
) (THIS_
134 REF(IRMABuffer
*) pBuffer
,
136 REF(UINT16
) unStreamNumber
,
137 REF(UINT8
) unASMFlags
,
138 REF(UINT16
) unASMRuleNumber
141 STDMETHOD_(IRMABuffer
*,GetBuffer
) (THIS
) PURE
;
143 STDMETHOD_(ULONG32
,GetTime
) (THIS
) PURE
;
145 STDMETHOD_(UINT16
,GetStreamNumber
) (THIS
) PURE
;
147 STDMETHOD_(UINT8
,GetASMFlags
) (THIS
) PURE
;
149 STDMETHOD_(UINT16
,GetASMRuleNumber
) (THIS
) PURE
;
151 STDMETHOD_(BOOL
,IsLost
) (THIS
) PURE
;
153 STDMETHOD(SetAsLost
) (THIS
) PURE
;
155 STDMETHOD(Set
) (THIS_
158 UINT16 uStreamNumber
,
160 UINT16 unASMRuleNumber
165 /****************************************************************************
173 * RTP data packet in the RealMedia system.
177 * {0169A731-1ED0-11d4-952B-00902742C923}
180 DEFINE_GUID(IID_IRMARTPPacket
, 0x169a731, 0x1ed0, 0x11d4, 0x95, 0x2b, 0x0,
181 0x90, 0x27, 0x42, 0xc9, 0x23);
184 * The IRMACommonClassFactory supports creating an instance
187 #define CLSID_IRMARTPPacket IID_IRMARTPPacket
190 #define INTERFACE IRMARTPPacket
192 DECLARE_INTERFACE_(IRMARTPPacket
, IRMAPacket
)
197 STDMETHOD(QueryInterface
) (THIS_
201 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
203 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
208 STDMETHOD(Get
) (THIS_
209 REF(IRMABuffer
*) pBuffer
,
211 REF(UINT16
) unStreamNumber
,
212 REF(UINT8
) unASMFlags
,
213 REF(UINT16
) unASMRuleNumber
216 STDMETHOD_(IRMABuffer
*,GetBuffer
) (THIS
) PURE
;
218 STDMETHOD_(ULONG32
,GetTime
) (THIS
) PURE
;
220 STDMETHOD_(UINT16
,GetStreamNumber
) (THIS
) PURE
;
222 STDMETHOD_(UINT8
,GetASMFlags
) (THIS
) PURE
;
224 STDMETHOD_(UINT16
,GetASMRuleNumber
) (THIS
) PURE
;
226 STDMETHOD_(BOOL
,IsLost
) (THIS
) PURE
;
228 STDMETHOD(SetAsLost
) (THIS
) PURE
;
230 STDMETHOD(Set
) (THIS_
233 UINT16 uStreamNumber
,
235 UINT16 unASMRuleNumber
239 * IRMARTPPacket methods
241 STDMETHOD_(ULONG32
,GetRTPTime
) (THIS
) PURE
;
243 STDMETHOD(GetRTP
) (THIS_
244 REF(IRMABuffer
*) pBuffer
,
246 REF(UINT32
) ulRTPTime
,
247 REF(UINT16
) unStreamNumber
,
248 REF(UINT8
) unASMFlags
,
249 REF(UINT16
) unASMRuleNumber
252 STDMETHOD(SetRTP
) (THIS_
256 UINT16 uStreamNumber
,
258 UINT16 unASMRuleNumber
263 /****************************************************************************
271 * This is an interface to a generic name-value pair facility. This
272 * is used in various places (such as stream headers).
276 * {00001302-0901-11d1-8B06-00A024406D59}
279 DEFINE_GUID(IID_IRMAValues
, 0x00001302, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
280 0xa0, 0x24, 0x40, 0x6d, 0x59);
283 * The IRMACommonClassFactory supports creating an instance
286 #define CLSID_IRMAValues IID_IRMAValues
289 #define INTERFACE IRMAValues
291 DECLARE_INTERFACE_(IRMAValues
, IUnknown
)
296 STDMETHOD(QueryInterface
) (THIS_
300 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
302 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
309 * Note: That strings returned as references should be copied or
310 * used immediately because their lifetime is only as long as the
311 * IRMAValues's objects lifetime.
313 * Note: Your iterator will be reset once you give up control to the
314 * RMA core (i.e. you exit whatever function gave you a time slice).
317 STDMETHOD(SetPropertyULONG32
) (THIS_
318 const char* pPropertyName
,
319 ULONG32 uPropertyValue
) PURE
;
321 STDMETHOD(GetPropertyULONG32
) (THIS_
322 const char* pPropertyName
,
323 REF(ULONG32
) uPropertyName
) PURE
;
325 STDMETHOD(GetFirstPropertyULONG32
) (THIS_
326 REF(const char*) pPropertyName
,
327 REF(ULONG32
) uPropertyValue
) PURE
;
329 STDMETHOD(GetNextPropertyULONG32
) (THIS_
330 REF(const char*) pPropertyName
,
331 REF(ULONG32
) uPropertyValue
) PURE
;
333 STDMETHOD(SetPropertyBuffer
) (THIS_
334 const char* pPropertyName
,
335 IRMABuffer
* pPropertyValue
) PURE
;
337 STDMETHOD(GetPropertyBuffer
) (THIS_
338 const char* pPropertyName
,
339 REF(IRMABuffer
*) pPropertyValue
) PURE
;
341 STDMETHOD(GetFirstPropertyBuffer
) (THIS_
342 REF(const char*) pPropertyName
,
343 REF(IRMABuffer
*) pPropertyValue
) PURE
;
345 STDMETHOD(GetNextPropertyBuffer
) (THIS_
346 REF(const char*) pPropertyName
,
347 REF(IRMABuffer
*) pPropertyValue
) PURE
;
349 STDMETHOD(SetPropertyCString
) (THIS_
350 const char* pPropertyName
,
351 IRMABuffer
* pPropertyValue
) PURE
;
353 STDMETHOD(GetPropertyCString
) (THIS_
354 const char* pPropertyName
,
355 REF(IRMABuffer
*) pPropertyValue
) PURE
;
357 STDMETHOD(GetFirstPropertyCString
) (THIS_
358 REF(const char*) pPropertyName
,
359 REF(IRMABuffer
*) pPropertyValue
) PURE
;
361 STDMETHOD(GetNextPropertyCString
) (THIS_
362 REF(const char*) pPropertyName
,
363 REF(IRMABuffer
*) pPropertyValue
) PURE
;
367 /****************************************************************************
375 * This interface is to add Remove methods to a class that supports
376 * IRMAValues. All classes that support this interface will also
377 * support IRMAValues.
381 * IID_IRMAValuesRemove:
383 * {00001303-0901-11d1-8B06-00A024406D59}
386 DEFINE_GUID(IID_IRMAValuesRemove
, 0x00001303, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
387 0xa0, 0x24, 0x40, 0x6d, 0x59);
390 * The IRMACommonClassFactory does not support creating an instance
395 #define INTERFACE IRMAValuesRemove
397 DECLARE_INTERFACE_(IRMAValuesRemove
, IUnknown
)
402 STDMETHOD(QueryInterface
) (THIS_
406 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
408 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
411 * IRMAValuesRemove methods
414 /************************************************************************
416 * IRMAKeyValuesRemove::Remove
418 * Remove all items matching pKey. (If you know what datatype you saved
419 * the key as, use the specific method.)
421 STDMETHOD(Remove
) (const char* pKey
) PURE
;
423 /************************************************************************
425 * IRMAKeyValuesRemove::RemoveULONG32
427 * Remove all ULONG32 items matching pKey.
429 STDMETHOD(RemoveULONG32
) (const char* pKey
) PURE
;
431 /************************************************************************
433 * IRMAKeyValuesRemove::RemoveBuffer
435 * Remove all Buffer items matching pKey.
437 STDMETHOD(RemoveBuffer
) (const char* pKey
) PURE
;
439 /************************************************************************
441 * IRMAKeyValuesRemove::RemoveCString
443 * Remove all CString items matching pKey.
445 STDMETHOD(RemoveCString
) (const char* pKey
) PURE
;
448 #endif /* _RMAPCKTS_H_ */