1 /****************************************************************************
3 * $Id: rmacomm.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 Common Utility interfaces
21 #include "rmaengin.h" // For RMATimeval
24 * Forward declarations of some interfaces defined here-in.
27 typedef _INTERFACE IRMACommonClassFactory IRMACommonClassFactory
;
28 typedef _INTERFACE IRMAStatistics IRMAStatistics
;
29 typedef _INTERFACE IRMARegistryID IRMARegistryID
;
30 typedef _INTERFACE IRMAServerFork IRMAServerFork
;
31 typedef _INTERFACE IRMAServerControl IRMAServerControl
;
32 typedef _INTERFACE IRMAReconfigServerResponse IRMAReconfigServerResponse
;
33 typedef _INTERFACE IRMABuffer IRMABuffer
;
34 typedef _INTERFACE IRMAWantServerReconfigNotification
35 IRMAWantServerReconfigNotification
;
36 typedef _INTERFACE IRMAFastAlloc IRMAFastAlloc
;
40 /****************************************************************************
44 * IRMACommonClassFactory
48 * RMA interface that manages the creation of common RMA classes.
50 * IID_IRMACommonClassFactory:
52 * {00000000-0901-11d1-8B06-00A024406D59}
55 DEFINE_GUID(IID_IRMACommonClassFactory
, 0x00000000, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
56 0xa0, 0x24, 0x40, 0x6d, 0x59);
59 #define INTERFACE IRMACommonClassFactory
61 DECLARE_INTERFACE_(IRMACommonClassFactory
, IUnknown
)
66 STDMETHOD(QueryInterface
) (THIS_
70 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
72 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
75 * IRMACommonClassFactory methods
78 /************************************************************************
80 * IRMACommonClassFactory::CreateInstance
82 * Creates instances of common objects supported by the system,
83 * like IRMABuffer, IRMAPacket, IRMAValues, etc.
85 * This method is similar to Window's CoCreateInstance() in its
86 * purpose, except that it only creates objects of a well known
89 * NOTE: Aggregation is never used. Therefore and outer unknown is
90 * not passed to this function, and you do not need to code for this
93 STDMETHOD(CreateInstance
) (THIS_
94 REFCLSID
/*IN*/ rclsid
,
95 void** /*OUT*/ ppUnknown
) PURE
;
97 /************************************************************************
99 * IRMAController::CreateInstanceAggregatable
101 * Creates instances of common objects that can be aggregated
102 * supported by the system, like IRMASiteWindowed
104 * This method is similar to Window's CoCreateInstance() in its
105 * purpose, except that it only creates objects of a well known
108 * NOTE 1: Unlike CreateInstance, this method will create internal
109 * objects that support Aggregation.
111 * NOTE 2: The output interface is always the non-delegating
114 STDMETHOD(CreateInstanceAggregatable
)
116 REFCLSID
/*IN*/ rclsid
,
117 REF(IUnknown
*) /*OUT*/ ppUnknown
,
118 IUnknown
* /*IN*/ pUnkOuter
) PURE
;
122 /****************************************************************************
130 * This interface allows update of the client statistics.
132 * IID_IRMAStatistics:
134 * {00000001-0901-11d1-8B06-00A024406D59}
137 DEFINE_GUID(IID_IRMAStatistics
, 0x00000001, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
138 0xa0, 0x24, 0x40, 0x6d, 0x59);
141 #define INTERFACE IRMAStatistics
143 DECLARE_INTERFACE_(IRMAStatistics
, IUnknown
)
148 STDMETHOD(QueryInterface
) (THIS_
152 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
154 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
157 * IRMAStatistics methods
160 /************************************************************************
162 * IRMAStatistics::Init
164 * Pass registry ID to the caller
167 STDMETHOD(InitializeStatistics
) (THIS_
168 UINT32
/*IN*/ ulRegistryID
) PURE
;
170 /************************************************************************
172 * IRMAStatistics::Update
174 * Notify the client to update its statistics stored in the registry
177 STDMETHOD(UpdateStatistics
) (THIS
) PURE
;
181 /****************************************************************************
189 * This interface is implemented by IRMAPlayer, IRMAStreamSource,
190 * and IRMAStream. It allows the user to get the registry Base ID,
191 * for an object that you have a pointer to.
193 * IID_IRMARegistryID:
195 * {00000002-0901-11d1-8B06-00A024406D59}
198 DEFINE_GUID(IID_IRMARegistryID
, 0x00000002, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
199 0xa0, 0x24, 0x40, 0x6d, 0x59);
202 #define INTERFACE IRMARegistryID
204 DECLARE_INTERFACE_(IRMARegistryID
, IUnknown
)
209 STDMETHOD(QueryInterface
) (THIS_
213 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
215 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
218 * IRMARegistryID methods
221 /************************************************************************
223 * IRMARegistryID::GetID
225 * Get the registry ID of the object.
228 STDMETHOD(GetID
) (THIS_
229 REF(UINT32
) /*OUT*/ ulRegistryID
) PURE
;
232 /****************************************************************************
240 * This interface is implemented by the server context on Unix
241 * platforms. This interface allows your plugin to fork off a
242 * process. Note that the process that is forked off cannot use
243 * any RMA APIs. The fork() system call is prohibited from within
246 * IID_IRMAServerFork:
248 * {00000003-0901-11d1-8B06-00A024406D59}
251 DEFINE_GUID(IID_IRMAServerFork
, 0x00000003, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
252 0xa0, 0x24, 0x40, 0x6d, 0x59);
255 #define INTERFACE IRMAServerFork
257 DECLARE_INTERFACE_(IRMAServerFork
, IUnknown
)
262 STDMETHOD(QueryInterface
) (THIS_
266 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
268 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
271 * IRMAServerFork methods
274 /************************************************************************
276 * IRMAServerFork::Fork
278 * Fork off a child process. The child process cannot use any RMA
279 * APIs. Upon successful completion, Fork returns 0 to the child
280 * process and the PID of the child to the parent. A return value
281 * of -1 indicates an error.
283 * Note: The child process should *NOT* Release any interfaces.
284 * The cleanup of the IRMAServerFork() interface and other
285 * RMA interfaces is done by the parent.
288 STDMETHOD_(INT32
, Fork
) (THIS
) PURE
;
299 * This inteface provides access to the RealMedia server's controls
300 * for shutting down (for now).
302 * Note: This registry is not related to the Windows system registry.
304 * IID_IRMAServerControl:
306 * {00000004-0901-11d1-8B06-00A024406D59}
309 DEFINE_GUID(IID_IRMAServerControl
, 0x00000004, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
310 0xa0, 0x24, 0x40, 0x6d, 0x59);
312 #define CLSID_IRMAServerControl IID_IRMAServerControl
315 #define INTERFACE IRMAServerControl
317 DECLARE_INTERFACE_(IRMAServerControl
, IUnknown
)
322 STDMETHOD(QueryInterface
) (THIS_
326 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
328 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
331 * IRMAServerControl methods
334 /************************************************************************
336 * IRMAServerControl::ShutdownServer
338 * Shutdown the server.
340 STDMETHOD(ShutdownServer
) (THIS_
352 * Interface for extended server control methods.
355 * IID_IRMAServerControl2:
357 * {00000005-0901-11d1-8B06-00A024406D59}
360 DEFINE_GUID(IID_IRMAServerControl2
, 0x00000005, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
361 0xa0, 0x24, 0x40, 0x6d, 0x59);
365 #define INTERFACE IRMAServerControl2
367 DECLARE_INTERFACE_(IRMAServerControl2
, IUnknown
)
372 STDMETHOD(QueryInterface
) (THIS_
376 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
378 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
381 * IRMAServerControl2 methods
384 /************************************************************************
385 * IRMAServerControl2::RestartServer
389 * Completely shutdown the server, then restart. Mainly used to
390 * cause not hot setting config var changes to take effect.
392 STDMETHOD(RestartServer
) (THIS
) PURE
;
394 /************************************************************************
395 * IRMAServerControl2::ReconfigServer
399 * Used to cause the server to re-read in config from file or registry
400 * (however it was started) and attempt to use the values.
402 STDMETHOD(ReconfigServer
) (THIS_ IRMAReconfigServerResponse
* pResp
) PURE
;
410 * IRMAReconfigServerResponse
414 * Response interface for IRMAServerControl2::ReconfigServer
417 * IID_IRMAReconfigServerResponse:
419 * {00000006-0901-11d1-8B06-00A024406D59}
422 DEFINE_GUID(IID_IRMAReconfigServerResponse
, 0x00000006, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
423 0xa0, 0x24, 0x40, 0x6d, 0x59);
427 #define INTERFACE IRMAReconfigServerResponse
429 DECLARE_INTERFACE_(IRMAReconfigServerResponse
, IUnknown
)
434 STDMETHOD(QueryInterface
) (THIS_
438 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
440 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
442 /************************************************************************
443 * IRMAReconfigServerResponse::ReconfigServerDone
447 * Notification that reconfiguring the server is done.
449 STDMETHOD(ReconfigServerDone
) (THIS_
452 UINT32 ulNumInfo
) PURE
;
459 * IRMAServerReconfigNotification
463 * Register with the server that you want notification when a reconfig
464 * request comes in and want/need to take part in the reconfiguration. This
465 * is used when you have configuration info outside the server config file
466 * which needs to be re-initialized.
469 * IID_IRMAServerReconfigNotification:
471 * {00000007-0901-11d1-8B06-00A024406D59}
474 DEFINE_GUID(IID_IRMAServerReconfigNotification
, 0x00000007, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
475 0xa0, 0x24, 0x40, 0x6d, 0x59);
479 #define INTERFACE IRMAServerReconfigNotification
481 DECLARE_INTERFACE_(IRMAServerReconfigNotification
, IUnknown
)
486 STDMETHOD(QueryInterface
) (THIS_
490 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
492 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
494 /************************************************************************
495 * IRMAServerReconfigNotification::WantReconfigNotification
499 * Tell the server that you want reconfig notification.
501 STDMETHOD(WantReconfigNotification
) (THIS_
502 IRMAWantServerReconfigNotification
* pResponse
) PURE
;
504 /************************************************************************
505 * IRMAServerReconfigNotification::CancelReconfigNotification
509 * Tell the server that you no longer want reconfig notification.
511 STDMETHOD(CancelReconfigNotification
) (THIS_
512 IRMAWantServerReconfigNotification
* pResponse
) PURE
;
520 * IRMAWantServerReconfigNotification
524 * Tell user that the server got a reconfig request and it is time to
525 * do your reconfiguration. NOTE: You should not need this if all of your
526 * configuration is stored in the config file; that is taken care of through
527 * IRMAActiveRegistry.
529 * IID_IRMAWantServerReconfigNotification:
531 * {00000008-0901-11d1-8B06-00A024406D59}
534 DEFINE_GUID(IID_IRMAWantServerReconfigNotification
, 0x00000008, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
535 0xa0, 0x24, 0x40, 0x6d, 0x59);
539 #define INTERFACE IRMAWantServerReconfigNotification
541 DECLARE_INTERFACE_(IRMAWantServerReconfigNotification
, IUnknown
)
546 STDMETHOD(QueryInterface
) (THIS_
550 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
552 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
554 /************************************************************************
555 * IRMAWantServerReconfigNotification::ServerReconfig
559 * Notify user that a server reconfig request had come in and it
560 * is now your turn to do external (not server config) reconfiguration.*
562 STDMETHOD(ServerReconfig
) (THIS_
563 IRMAReconfigServerResponse
* pResponse
) PURE
;
568 #endif /*_RMACOMM_H_*/