rmaallow.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:9k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /****************************************************************************
  2.  * 
  3.  *  $Id: rmaallow.h,v 1.1 2003/05/30 02:17:36 gabest Exp $
  4.  *  
  5.  *  Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
  6.  *
  7.  *  http://www.real.com/devzone
  8.  *
  9.  *  This program contains proprietary 
  10.  *  information of Progressive Networks, Inc, and is licensed
  11.  *  subject to restrictions on use and distribution.
  12.  *
  13.  *  Interfaces related to allowance plugins.
  14.  *
  15.  */
  16. #ifndef _RMAALLOW_H_
  17. #define _RMAALLOW_H_
  18. /*
  19.  * Forward declarations of some interfaces defined or used here-in.
  20.  */
  21. typedef _INTERFACE  IRMAValues     IRMAValues;
  22. typedef _INTERFACE  IRMABuffer     IRMABuffer;
  23. typedef _INTERFACE  IRMARequest     IRMARequest;
  24. typedef _INTERFACE  IRMAPlayerConnectionAdviseSinkManager  IRMAPlayerConnectionAdviseSinkManager;
  25. typedef _INTERFACE  IRMAPlayerConnectionAdviseSink  IRMAPlayerConnectionAdviseSink;
  26. typedef _INTERFACE  IRMAPlayerConnectionResponse    IRMAPlayerConnectionResponse;
  27. typedef _INTERFACE  IRMAPlayerController            IRMAPlayerController;
  28. typedef _INTERFACE  IRMAPlayerControllerProxyRedirect IRMAPlayerControllerProxyRedirect;
  29. /****************************************************************************
  30.  * 
  31.  *  Interface:
  32.  * 
  33.  *      IRMAPlayerConnectionAdviseSink
  34.  * 
  35.  *  Purpose:
  36.  *
  37.  *      Advise Sink which receives notification whenever a new player 
  38.  *      connects to the server.
  39.  * 
  40.  *  IID_IRMAPlayerConnectionAdviseSink:
  41.  * 
  42.  *      {00002600-0901-11d1-8B06-00A024406D59}
  43.  * 
  44.  */
  45. DEFINE_GUID(IID_IRMAPlayerConnectionAdviseSink, 0x00002600, 0x901, 0x11d1, 
  46.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  47. #undef  INTERFACE
  48. #define INTERFACE IRMAPlayerConnectionAdviseSink
  49. DECLARE_INTERFACE_(IRMAPlayerConnectionAdviseSink, IUnknown)
  50. {
  51.     STDMETHOD(QueryInterface)           (THIS_
  52. REFIID riid,
  53. void** ppvObj) PURE;
  54.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  55.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  56.     /* OnConnection is called when a new player has connected to the
  57.      * server.  If the result is PNR_OK, then the plugin will be notified
  58.      * when certain events occur in the player's life cycle.
  59.      */
  60.     STDMETHOD(OnConnection) (THIS_ 
  61. IRMAPlayerConnectionResponse* pResponse) PURE;
  62.     /* SetPlayerController is called by the server core to provide us with
  63.      * an interface which can stop, alert, redirect or otherwise control
  64.      * the player we are receiving notifications about.
  65.      */
  66.     STDMETHOD(SetPlayerController)  (THIS_
  67. IRMAPlayerController* pPlayerController) PURE;
  68.     /* SetRegistryID is called by the server core to provide us with the
  69.      * ID for this Player in the server registry. The plugin can use this
  70.      * registry ID to find out various information about the connected player.
  71.      */
  72.     STDMETHOD(SetRegistryID)        (THIS_ UINT32 ulPlayerRegistryID) PURE;
  73.     STDMETHOD(OnURL)                (THIS_ IRMARequest* pRequest) PURE;
  74.     STDMETHOD(OnBegin)              (THIS) PURE;
  75.     STDMETHOD(OnStop)               (THIS) PURE;
  76.     STDMETHOD(OnPause)              (THIS) PURE;
  77.     STDMETHOD(OnDone)               (THIS) PURE;
  78. };
  79. /****************************************************************************
  80.  * 
  81.  *  Interface:
  82.  * 
  83.  *      IRMAPlayerConnectionResponse
  84.  * 
  85.  *  Purpose:
  86.  *
  87.  *      Response object for the PlayerConnectionAdviseSink.
  88.  * 
  89.  *  IID_IRMAPlayerConnectionResponse:
  90.  * 
  91.  *      {00002601-0901-11d1-8B06-00A024406D59}
  92.  * 
  93.  */
  94. DEFINE_GUID(IID_IRMAPlayerConnectionResponse, 0x00002601, 0x901, 0x11d1, 
  95.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  96. #undef  INTERFACE
  97. #define INTERFACE IRMAPlayerConnectionResponse
  98. DECLARE_INTERFACE_(IRMAPlayerConnectionResponse, IUnknown)
  99. {
  100.     STDMETHOD(QueryInterface)           (THIS_
  101. REFIID riid,
  102. void** ppvObj) PURE;
  103.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  104.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  105.     STDMETHOD(OnConnectionDone) (THIS_ PN_RESULT status) PURE;
  106.     STDMETHOD(OnURLDone) (THIS_ PN_RESULT status) PURE;
  107.     STDMETHOD(OnBeginDone) (THIS_ PN_RESULT status) PURE;
  108.     STDMETHOD(OnStopDone) (THIS_ PN_RESULT status) PURE;
  109.     STDMETHOD(OnPauseDone) (THIS_ PN_RESULT status) PURE;
  110. };
  111. /****************************************************************************
  112.  * 
  113.  *  Interface:
  114.  * 
  115.  *      IRMAPlayerController
  116.  * 
  117.  *  Purpose:
  118.  *
  119.  *      Object created by the server core and given to the 
  120.  *      IRMAPlayerConnectionResponse object so that the response object
  121.  *      can control the connected player.
  122.  * 
  123.  *  IID_IRMAPlayerController:
  124.  * 
  125.  *      {00002602-0901-11d1-8B06-00A024406D59}
  126.  * 
  127.  */
  128. DEFINE_GUID(IID_IRMAPlayerController, 0x00002602, 0x901, 0x11d1, 
  129.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  130. #undef  INTERFACE
  131. #define INTERFACE IRMAPlayerController
  132. DECLARE_INTERFACE_(IRMAPlayerController, IUnknown)
  133. {
  134.     STDMETHOD(QueryInterface)           (THIS_
  135. REFIID riid,
  136. void** ppvObj) PURE;
  137.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  138.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  139.     STDMETHOD(Pause)         (THIS) PURE;
  140.     STDMETHOD(Resume)                   (THIS) PURE;
  141.     STDMETHOD(Disconnect)               (THIS) PURE;
  142.     STDMETHOD(AlertAndDisconnect)       (THIS_ IRMABuffer* pAlert) PURE;
  143.     /* HostRedirect is called by a PlayerConnectionAdviseSink to redirect
  144.      * this player to another host and/or port, for the same URL. This
  145.      * method works with both RTSP and PNA protocols.
  146.      */
  147.     STDMETHOD(HostRedirect)             (THIS_ IRMABuffer* pHost, 
  148. UINT16 nPort) PURE;
  149.     /* NetworkRedirect is called by a PlayerConnectionAdviseSink to redirect
  150.      * this player to another URL. Note: This method is only available for
  151.      * redirecting an RTSP player connection to another RTSP URL.
  152.      */
  153.     STDMETHOD(NetworkRedirect)          (THIS_ IRMABuffer* pURL,
  154. UINT32 ulSecsFromNow) PURE;
  155.     /* Redirect is called by a PlayerConnectionAdviseSink to redirect
  156.      * this player to another URL on the same server. For example, if 
  157.      * pPartialURL were set to "welcome.rm", the player would be redirected
  158.      * to "current_protocol://current_host:current_port/welcome.rm". This
  159.      * method works with both RTSP and PNA protocols.
  160.      */
  161.     STDMETHOD(Redirect) (THIS_ IRMABuffer* pPartialURL) PURE;
  162. };
  163. /****************************************************************************
  164.  * 
  165.  *  Interface:
  166.  * 
  167.  *      IRMAPlayerConnectionAdviseSinkManager
  168.  * 
  169.  *  Purpose:
  170.  *
  171.  *      Manages the creation of IRMAPlayerConnectionAdviseSink objects
  172.  * 
  173.  *  IID_IRMAPlayerConnectionAdviseSinkManager:
  174.  * 
  175.  *      {00002603-0901-11d1-8B06-00A024406D59}
  176.  * 
  177.  */
  178. DEFINE_GUID(IID_IRMAPlayerConnectionAdviseSinkManager, 0x00002603, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  179. #undef  INTERFACE
  180. #define INTERFACE IRMAPlayerConnectionAdviseSinkManager
  181. DECLARE_INTERFACE_(IRMAPlayerConnectionAdviseSinkManager, IUnknown)
  182. {
  183.     STDMETHOD(QueryInterface)           (THIS_
  184. REFIID riid,
  185. void** ppvObj) PURE;
  186.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  187.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  188.     STDMETHOD(CreatePlayerConnectionAdviseSink)
  189. (THIS_
  190. REF(IRMAPlayerConnectionAdviseSink*) pPCAdviseSink) PURE;
  191. };
  192. /****************************************************************************
  193.  * 
  194.  *  Interface:
  195.  * 
  196.  *      IRMAPlayerControllerProxyRedirect
  197.  * 
  198.  *  Purpose:
  199.  *
  200.  *      QueryInterfaced from IRMAPlayerController.  Allows 305 proxy redirect
  201.  *      to be issued (as per RTSP spec).
  202.  * 
  203.  *  IID_IRMAPlayerControllerProxyRedirect:
  204.  * 
  205.  *      {00002607-0901-11d1-8B06-00A024406D59}
  206.  * 
  207.  */
  208. DEFINE_GUID(IID_IRMAPlayerControllerProxyRedirect, 0x00002607, 0x901, 0x11d1, 
  209.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  210. #undef  INTERFACE
  211. #define INTERFACE IRMAPlayerControllerProxyRedirect
  212. DECLARE_INTERFACE_(IRMAPlayerControllerProxyRedirect, IUnknown)
  213. {
  214.     STDMETHOD(QueryInterface)           (THIS_
  215. REFIID riid,
  216. void** ppvObj) PURE;
  217.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  218.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  219.     /*
  220.      * This URL is just a hostname / port.  It must be formatted like this:
  221.      * "rtsp://audio.real.com:554/".
  222.      *
  223.      * NOTE:  You can *only* call this method between OnURL() and OnURLDone().
  224.      * NOTE:  This method only works on RTSP connections.
  225.      */
  226.     STDMETHOD(NetworkProxyRedirect)          (THIS_ IRMABuffer* pURL) PURE;
  227. };
  228. #endif /* _RMAALLOW_H_ */