hxallow.h
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:12k
源码类别:

Symbian

开发平台:

C/C++

  1. /* ***** BEGIN LICENSE BLOCK ***** 
  2.  * Version: RCSL 1.0/RPSL 1.0 
  3.  *  
  4.  * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
  5.  *      
  6.  * The contents of this file, and the files included with this file, are 
  7.  * subject to the current version of the RealNetworks Public Source License 
  8.  * Version 1.0 (the "RPSL") available at 
  9.  * http://www.helixcommunity.org/content/rpsl unless you have licensed 
  10.  * the file under the RealNetworks Community Source License Version 1.0 
  11.  * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
  12.  * in which case the RCSL will apply. You may also obtain the license terms 
  13.  * directly from RealNetworks.  You may not use this file except in 
  14.  * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
  15.  * applicable to this file, the RCSL.  Please see the applicable RPSL or 
  16.  * RCSL for the rights, obligations and limitations governing use of the 
  17.  * contents of the file.  
  18.  *  
  19.  * This file is part of the Helix DNA Technology. RealNetworks is the 
  20.  * developer of the Original Code and owns the copyrights in the portions 
  21.  * it created. 
  22.  *  
  23.  * This file, and the files included with this file, is distributed and made 
  24.  * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  25.  * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  26.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
  27.  * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
  28.  * 
  29.  * Technology Compatibility Kit Test Suite(s) Location: 
  30.  *    http://www.helixcommunity.org/content/tck 
  31.  * 
  32.  * Contributor(s): 
  33.  *  
  34.  * ***** END LICENSE BLOCK ***** */ 
  35. #ifndef _HXALLOW_H_
  36. #define _HXALLOW_H_
  37. /*
  38.  * Forward declarations of some interfaces defined or used here-in.
  39.  */
  40. typedef _INTERFACE  IHXValues     IHXValues;
  41. typedef _INTERFACE  IHXBuffer     IHXBuffer;
  42. typedef _INTERFACE  IHXRequest     IHXRequest;
  43. typedef _INTERFACE  IHXPlayerConnectionAdviseSinkManager    IHXPlayerConnectionAdviseSinkManager;
  44. typedef _INTERFACE  IHXPlayerConnectionAdviseEvents         IHXPlayerConnectionAdviseEvents;
  45. typedef _INTERFACE  IHXPlayerConnectionAdviseSink           IHXPlayerConnectionAdviseSink;
  46. typedef _INTERFACE  IHXPlayerConnectionResponse             IHXPlayerConnectionResponse;
  47. typedef _INTERFACE  IHXPlayerController                     IHXPlayerController;
  48. typedef _INTERFACE  IHXPlayerControllerProxyRedirect        IHXPlayerControllerProxyRedirect;
  49. typedef _INTERFACE  IHXMidBoxNotify                         IHXMidBoxNotify;
  50. // IHXPlayerConnectionAdviseEvents file types
  51. #define ADVISE_FILE_LIVE    0x0001
  52. #define ADVISE_FILE_ALL     0xffff
  53. // IHXPlayerConnectionAdviseEvents event types
  54. #define ADVISE_EVENT_NONE       0x0000
  55. #define ADVISE_EVENT_ONURL      0x0001
  56. #define ADVISE_EVENT_ONBEGIN    0x0002
  57. #define ADVISE_EVENT_ONSTOP     0x0004
  58. #define ADVISE_EVENT_ONPAUSE    0x0008
  59. #define ADVISE_EVENT_ONDONE     0x0010
  60. #define ADVISE_EVENT_ALL        0xffff
  61. /****************************************************************************
  62.  * 
  63.  *  Interface:
  64.  * 
  65.  *      IHXPlayerConnectionAdviseEvents
  66.  * 
  67.  *  Purpose:
  68.  *
  69.  *      Provide negotiation between file type and interesting events.
  70.  * 
  71.  *  IID_IHXPlayerConnectionAdviseEvents:
  72.  * 
  73.  *      {8fe78da6-a828-11d7-939c-00601df0ce4c}
  74.  * 
  75.  */
  76. DEFINE_GUID(IID_IHXPlayerConnectionAdviseEvents, 0x8fe78da6, 0xa828, 0x11d7, 
  77.     0x93, 0x9c, 0x0, 0x60, 0x1d, 0xf0, 0xce, 0x4c);
  78. #undef  INTERFACE
  79. #define INTERFACE IHXPlayerConnectionAdviseEvents
  80. DECLARE_INTERFACE_(IHXPlayerConnectionAdviseEvents, IUnknown)
  81. {
  82.     STDMETHOD(QueryInterface)           (THIS_
  83. REFIID riid,
  84. void** ppvObj) PURE;
  85.     STDMETHOD_(ULONG32,AddRef)          (THIS) PURE;
  86.     STDMETHOD_(ULONG32,Release)         (THIS) PURE;
  87.     STDMETHOD_(UINT32,EventSelect)      (THIS_ UINT32 uFileType) PURE;
  88. };
  89. /****************************************************************************
  90.  * 
  91.  *  Interface:
  92.  * 
  93.  *      IHXPlayerConnectionAdviseSink
  94.  * 
  95.  *  Purpose:
  96.  *
  97.  *      Advise Sink which receives notification whenever a new player 
  98.  *      connects to the server.
  99.  * 
  100.  *  IID_IHXPlayerConnectionAdviseSink:
  101.  * 
  102.  *      {00002600-0901-11d1-8B06-00A024406D59}
  103.  * 
  104.  */
  105. DEFINE_GUID(IID_IHXPlayerConnectionAdviseSink, 0x00002600, 0x901, 0x11d1, 
  106.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  107. #undef  INTERFACE
  108. #define INTERFACE IHXPlayerConnectionAdviseSink
  109. DECLARE_INTERFACE_(IHXPlayerConnectionAdviseSink, IUnknown)
  110. {
  111.     STDMETHOD(QueryInterface)           (THIS_
  112. REFIID riid,
  113. void** ppvObj) PURE;
  114.     STDMETHOD_(ULONG32,AddRef)          (THIS) PURE;
  115.     STDMETHOD_(ULONG32,Release)         (THIS) PURE;
  116.     /* OnConnection is called when a new player has connected to the
  117.      * server.  If the result is HXR_OK, then the plugin will be notified
  118.      * when certain events occur in the player's life cycle.
  119.      */
  120.     STDMETHOD(OnConnection) (THIS_ 
  121. IHXPlayerConnectionResponse* pResponse) PURE;
  122.     /* SetPlayerController is called by the server core to provide us with
  123.      * an interface which can stop, alert, redirect or otherwise control
  124.      * the player we are receiving notifications about.
  125.      */
  126.     STDMETHOD(SetPlayerController)  (THIS_
  127. IHXPlayerController* pPlayerController) PURE;
  128.     /* SetRegistryID is called by the server core to provide us with the
  129.      * ID for this Player in the server registry. The plugin can use this
  130.      * registry ID to find out various information about the connected player.
  131.      */
  132.     STDMETHOD(SetRegistryID)        (THIS_ UINT32 ulPlayerRegistryID) PURE;
  133.     STDMETHOD(OnURL)                (THIS_ IHXRequest* pRequest) PURE;
  134.     STDMETHOD(OnBegin)              (THIS) PURE;
  135.     STDMETHOD(OnStop)               (THIS) PURE;
  136.     STDMETHOD(OnPause)              (THIS) PURE;
  137.     STDMETHOD(OnDone)               (THIS) PURE;
  138. };
  139. /****************************************************************************
  140.  * 
  141.  *  Interface:
  142.  * 
  143.  *      IHXPlayerConnectionResponse
  144.  * 
  145.  *  Purpose:
  146.  *
  147.  *      Response object for the PlayerConnectionAdviseSink.
  148.  * 
  149.  *  IID_IHXPlayerConnectionResponse:
  150.  * 
  151.  *      {00002601-0901-11d1-8B06-00A024406D59}
  152.  * 
  153.  */
  154. DEFINE_GUID(IID_IHXPlayerConnectionResponse, 0x00002601, 0x901, 0x11d1, 
  155.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  156. #undef  INTERFACE
  157. #define INTERFACE IHXPlayerConnectionResponse
  158. DECLARE_INTERFACE_(IHXPlayerConnectionResponse, IUnknown)
  159. {
  160.     STDMETHOD(QueryInterface)           (THIS_
  161. REFIID riid,
  162. void** ppvObj) PURE;
  163.     STDMETHOD_(ULONG32,AddRef)          (THIS) PURE;
  164.     STDMETHOD_(ULONG32,Release)         (THIS) PURE;
  165.     STDMETHOD(OnConnectionDone) (THIS_ HX_RESULT status) PURE;
  166.     STDMETHOD(OnURLDone) (THIS_ HX_RESULT status) PURE;
  167.     STDMETHOD(OnBeginDone) (THIS_ HX_RESULT status) PURE;
  168.     STDMETHOD(OnStopDone) (THIS_ HX_RESULT status) PURE;
  169.     STDMETHOD(OnPauseDone) (THIS_ HX_RESULT status) PURE;
  170. };
  171. /****************************************************************************
  172.  * 
  173.  *  Interface:
  174.  * 
  175.  *      IHXPlayerController
  176.  * 
  177.  *  Purpose:
  178.  *
  179.  *      Object created by the server core and given to the 
  180.  *      IHXPlayerConnectionResponse object so that the response object
  181.  *      can control the connected player.
  182.  * 
  183.  *  IID_IHXPlayerController:
  184.  * 
  185.  *      {00002602-0901-11d1-8B06-00A024406D59}
  186.  * 
  187.  */
  188. DEFINE_GUID(IID_IHXPlayerController, 0x00002602, 0x901, 0x11d1, 
  189.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  190. #undef  INTERFACE
  191. #define INTERFACE IHXPlayerController
  192. DECLARE_INTERFACE_(IHXPlayerController, IUnknown)
  193. {
  194.     STDMETHOD(QueryInterface)           (THIS_
  195. REFIID riid,
  196. void** ppvObj) PURE;
  197.     STDMETHOD_(ULONG32,AddRef)          (THIS) PURE;
  198.     STDMETHOD_(ULONG32,Release)         (THIS) PURE;
  199.     STDMETHOD(Pause)         (THIS) PURE;
  200.     STDMETHOD(Resume)                   (THIS) PURE;
  201.     STDMETHOD(Disconnect)               (THIS) PURE;
  202.     STDMETHOD(AlertAndDisconnect)       (THIS_ IHXBuffer* pAlert) PURE;
  203.     /* HostRedirect is called by a PlayerConnectionAdviseSink to redirect
  204.      * this player to another host and/or port, for the same URL. This
  205.      * method works with both RTSP and PNA protocols.
  206.      */
  207.     STDMETHOD(HostRedirect)             (THIS_ IHXBuffer* pHost, 
  208. UINT16 nPort) PURE;
  209.     /* NetworkRedirect is called by a PlayerConnectionAdviseSink to redirect
  210.      * this player to another URL. Note: This method is only available for
  211.      * redirecting an RTSP player connection to another RTSP URL.
  212.      */
  213.     STDMETHOD(NetworkRedirect)          (THIS_ IHXBuffer* pURL,
  214. UINT32 ulSecsFromNow) PURE;
  215.     /* Redirect is called by a PlayerConnectionAdviseSink to redirect
  216.      * this player to another URL on the same server. For example, if 
  217.      * pPartialURL were set to "welcome.rm", the player would be redirected
  218.      * to "current_protocol://current_host:current_port/welcome.rm". This
  219.      * method works with both RTSP and PNA protocols.
  220.      */
  221.     STDMETHOD(Redirect) (THIS_ IHXBuffer* pPartialURL) PURE;
  222. };
  223. /****************************************************************************
  224.  * 
  225.  *  Interface:
  226.  * 
  227.  *      IHXPlayerConnectionAdviseSinkManager
  228.  * 
  229.  *  Purpose:
  230.  *
  231.  *      Manages the creation of IHXPlayerConnectionAdviseSink objects
  232.  * 
  233.  *  IID_IHXPlayerConnectionAdviseSinkManager:
  234.  * 
  235.  *      {00002603-0901-11d1-8B06-00A024406D59}
  236.  * 
  237.  */
  238. DEFINE_GUID(IID_IHXPlayerConnectionAdviseSinkManager, 0x00002603, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  239. #undef  INTERFACE
  240. #define INTERFACE IHXPlayerConnectionAdviseSinkManager
  241. DECLARE_INTERFACE_(IHXPlayerConnectionAdviseSinkManager, IUnknown)
  242. {
  243.     STDMETHOD(QueryInterface)           (THIS_
  244. REFIID riid,
  245. void** ppvObj) PURE;
  246.     STDMETHOD_(ULONG32,AddRef)          (THIS) PURE;
  247.     STDMETHOD_(ULONG32,Release)         (THIS) PURE;
  248.     STDMETHOD(CreatePlayerConnectionAdviseSink)
  249. (THIS_
  250. REF(IHXPlayerConnectionAdviseSink*) pPCAdviseSink) PURE;
  251. };
  252. /****************************************************************************
  253.  * 
  254.  *  Interface:
  255.  * 
  256.  *      IHXPlayerControllerProxyRedirect
  257.  * 
  258.  *  Purpose:
  259.  *
  260.  *      QueryInterfaced from IHXPlayerController.  Allows 305 proxy redirect
  261.  *      to be issued (as per RTSP spec).
  262.  * 
  263.  *  IID_IHXPlayerControllerProxyRedirect:
  264.  * 
  265.  *      {00002607-0901-11d1-8B06-00A024406D59}
  266.  * 
  267.  */
  268. DEFINE_GUID(IID_IHXPlayerControllerProxyRedirect, 0x00002607, 0x901, 0x11d1, 
  269.     0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  270. #undef  INTERFACE
  271. #define INTERFACE IHXPlayerControllerProxyRedirect
  272. DECLARE_INTERFACE_(IHXPlayerControllerProxyRedirect, IUnknown)
  273. {
  274.     STDMETHOD(QueryInterface)           (THIS_
  275. REFIID riid,
  276. void** ppvObj) PURE;
  277.     STDMETHOD_(ULONG32,AddRef)          (THIS) PURE;
  278.     STDMETHOD_(ULONG32,Release)         (THIS) PURE;
  279.     /*
  280.      * This URL is just a hostname / port.  It must be formatted like this:
  281.      * "rtsp://audio.real.com:554/".
  282.      *
  283.      * NOTE:  You can *only* call this method between OnURL() and OnURLDone().
  284.      * NOTE:  This method only works on RTSP connections.
  285.      */
  286.     STDMETHOD(NetworkProxyRedirect)          (THIS_ IHXBuffer* pURL) PURE;
  287. };
  288. //$ Private:
  289. /****************************************************************************
  290.  * 
  291.  *  Interface:
  292.  * 
  293.  *      IHXMidBoxNotify
  294.  * 
  295.  *  Purpose:
  296.  *
  297.  *      Notify allowance plugins that the client is or is not a "midbox".
  298.  *      A midbox is a device between the player and server, such as a
  299.  *      proxy or splitter.
  300.  * 
  301.  *  IID_IHXMidBoxNotify:
  302.  *
  303.  *      {f8c5dcaf-9a5f-4d1b-a061-22fa0d038848}
  304.  * 
  305.  */
  306. DEFINE_GUID(IID_IHXMidBoxNotify, 0xf8c5dcaf, 0x9a5f, 0x4d1b,
  307.     0xa0, 0x61, 0x22, 0xfa, 0x0d, 0x03, 0x88, 0x48);
  308. #undef  INTERFACE
  309. #define INTERFACE IHXMidBoxNotify
  310. DECLARE_INTERFACE_(IHXMidBoxNotify, IUnknown)
  311. {
  312.     STDMETHOD(QueryInterface)           (THIS_
  313. REFIID riid,
  314. void** ppvObj) PURE;
  315.     STDMETHOD_(ULONG32,AddRef)          (THIS) PURE;
  316.     STDMETHOD_(ULONG32,Release)         (THIS) PURE;
  317.     STDMETHOD(SetMidBox)                (THIS_ BOOL bIsMidBox) PURE;
  318. };
  319. // $EndPrivate.
  320. #endif /* _HXALLOW_H_ */