hxallow.h
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:13k
源码类别:

Symbian

开发平台:

Visual C++

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