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

Symbian

开发平台:

Visual C++

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Source last modified: $Id: hxsmbw.h,v 1.2.32.3 2004/07/09 01:45:13 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 _HXSMBW_H_
  50. #define _HXSMBW_H_
  51. #include "hxcom.h"
  52. /*
  53.  * Forward declarations of some interfaces defined here-in.
  54.  */
  55. typedef _INTERFACE IHXPlayer     IHXPlayer;
  56. typedef _INTERFACE IHXBandwidthManagerInput   IHXBandwidthManagerInput;
  57. class HXSource;
  58. class CHXSimpleList;
  59. /****************************************************************************
  60.  * 
  61.  *  Interface:
  62.  *
  63.  * IHXBandwidthManager
  64.  *
  65.  *  Purpose:
  66.  *
  67.  * Implemented by the ASM Manager to allow sources to register
  68.  * themselves.
  69.  *
  70.  *  IID_IHXBandwidthManager:
  71.  *
  72.  * {00000800-b4c8-11d0-9995-00a0248da5f0}
  73.  *
  74.  */
  75. DEFINE_GUID(IID_IHXBandwidthManager, 0x00000800, 0xb4c8, 0x11d0,
  76.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  77. #undef  INTERFACE
  78. #define INTERFACE   IHXBandwidthManager
  79. DECLARE_INTERFACE_(IHXBandwidthManager, IUnknown)
  80. {
  81.     /*
  82.      * IUnknown methods
  83.      */
  84.     STDMETHOD(QueryInterface) (THIS_
  85. REFIID riid,
  86. void** ppvObj) PURE;
  87.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  88.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  89.     /*
  90.      * IHXBandwidthManager methods
  91.      */
  92.     STDMETHOD(RegisterSource) (THIS_
  93. HXSource* pSource,
  94. IUnknown* pUnknown) PURE;
  95.     STDMETHOD(RegisterSourcesDone) (THIS) PURE;
  96.     STDMETHOD_(BOOL, NotEnoughBandwidth)(THIS) PURE;
  97.     STDMETHOD(UnRegisterSource) (THIS_
  98. HXSource* pSource) PURE;
  99.     /* If the source has enough data, it may tell the bandwidth
  100.      * manager to cut down on accelerated buffering. 
  101.      */
  102.     STDMETHOD(ChangeAccelerationStatus) (THIS_
  103. HXSource* pSource,
  104. BOOL    bMayBeAccelerated,
  105. BOOL    bUseAccelerationFactor,
  106. UINT32    ulAccelerationFactor) PURE;
  107.     /* Called by HXPlayer at end of each presentation.  */
  108.     STDMETHOD(PresentationDone) (THIS) PURE;
  109.     STDMETHOD(ChangeBW) (THIS_ 
  110. UINT32 newBW, 
  111. HXSource* pSource) PURE;
  112. };
  113. /****************************************************************************
  114.  * 
  115.  *  Interface:
  116.  *
  117.  * IHXSourceBandwidthInfo
  118.  *
  119.  *  Purpose:
  120.  *
  121.  * Implemented by RTSP Transport to associate it with the ASM
  122.  * manager and set the transmission rate.
  123.  *
  124.  *  IID_IHXSourceBandwidthInfo:
  125.  *
  126.  * {00000801-b4c8-11d0-9995-00a0248da5f0}
  127.  *
  128.  */
  129. DEFINE_GUID(IID_IHXSourceBandwidthInfo, 0x00000801, 0xb4c8, 0x11d0,
  130.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  131. #undef  INTERFACE
  132. #define INTERFACE   IHXSourceBandwidthInfo
  133. DECLARE_INTERFACE_(IHXSourceBandwidthInfo, IUnknown)
  134. {
  135.     /*
  136.      * IUnknown methods
  137.      */
  138.     STDMETHOD(QueryInterface) (THIS_
  139. REFIID riid,
  140. void** ppvObj) PURE;
  141.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  142.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  143.     /*
  144.      * IHXSourceBandwidthInfo methods
  145.      */
  146.     STDMETHOD(InitBw) (THIS_
  147. IHXBandwidthManagerInput* pBwMgr) PURE;
  148.     STDMETHOD(SetTransmitRate) (THIS_
  149. UINT32 ulBitRate) PURE;
  150. };
  151. /****************************************************************************
  152.  * 
  153.  *  Interface:
  154.  *
  155.  * IHXBandwidthManagerInput
  156.  *
  157.  *  Purpose:
  158.  *
  159.  * Implemented by ASM Managers to allow the transport to report
  160.  * information about bandwidth usage & stats.
  161.  *
  162.  *  IID_IHXBandwidthManagerInput:
  163.  *
  164.  * {00000802-b4c8-11d0-9995-00a0248da5f0}
  165.  *
  166.  */
  167. DEFINE_GUID(IID_IHXBandwidthManagerInput, 0x00000802, 0xb4c8, 0x11d0,
  168.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  169. #undef  INTERFACE
  170. #define INTERFACE   IHXBandwidthManagerInput
  171. typedef enum _transport_type
  172. {
  173.     TNG_TCP, TNG_UDP
  174. } TRANSPORT_TYPE;
  175. #define REPORT_DATA_PACKET_LOST 0xffffffff
  176. DECLARE_INTERFACE_(IHXBandwidthManagerInput, IUnknown)
  177. {
  178.     /*
  179.      * IUnknown methods
  180.      */
  181.     STDMETHOD(QueryInterface) (THIS_
  182. REFIID riid,
  183. void** ppvObj) PURE;
  184.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  185.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  186.     /*
  187.      * IHXBandwidthManagerInput methods
  188.      */
  189.     STDMETHOD(ReportDataPacket) (THIS_
  190. UINT32 ulTimeStamp,
  191. UINT32 ulArrivedTimeStamp,
  192. UINT32 ulSize) PURE;
  193.     STDMETHOD(ReportUpshiftInfo) (THIS_
  194. UINT32 ulTimeStamp,
  195. UINT32 ulSize) PURE;
  196.     STDMETHOD(ReportLatency) (THIS_
  197. UINT32 ulServerTime,
  198. UINT32 ulClientTime) PURE;
  199.     STDMETHOD(SetCongestionFactor) (THIS_
  200. UINT32 ulFactor) PURE;
  201.     STDMETHOD(SetTransportType) (THIS_
  202. TRANSPORT_TYPE type) PURE;
  203. };
  204. /****************************************************************************
  205.  * 
  206.  *  Interface:
  207.  *
  208.  * IHXStreamBandwidthNegotiator
  209.  *
  210.  *  Purpose:
  211.  *
  212.  * Implemented by ASM Stream objects to give basic information to
  213.  * the ASM manager.
  214.  *
  215.  *  IID_IHXStreamBandwidthNegotiator:
  216.  *
  217.  * {00000803-b4c8-11d0-9995-00a0248da5f0}
  218.  *
  219.  */
  220. DEFINE_GUID(IID_IHXStreamBandwidthNegotiator, 0x00000803, 0xb4c8, 0x11d0,
  221.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  222. #undef  INTERFACE
  223. #define INTERFACE   IHXStreamBandwidthNegotiator
  224. DECLARE_INTERFACE_(IHXStreamBandwidthNegotiator, IUnknown)
  225. {
  226.     /*
  227.      * IUnknown methods
  228.      */
  229.     STDMETHOD(QueryInterface) (THIS_
  230. REFIID riid,
  231. void** ppvObj) PURE;
  232.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  233.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  234.     /*
  235.      * IHXStreamBandwidthNegotiator methods
  236.      */
  237.     STDMETHOD(SetBandwidthUsage) (THIS_
  238. REF(UINT32) ulRecvBitRate,
  239. REF(BOOL)   bTimeStampDelivery) PURE;
  240.     STDMETHOD(HandleSlowSource)         (THIS_
  241. UINT32 ulRecvBitRate) PURE;
  242.     STDMETHOD(GetFixedBandwidth) (THIS_
  243. REF(UINT32) ulBitRate) PURE;
  244.     STDMETHOD(GetThresholdInfo) (THIS_
  245. float*     pThreshold,
  246. REF(UINT32) ulNumThreshold) PURE;
  247.     STDMETHOD(UnRegister) (THIS) PURE;
  248.     STDMETHOD_(ULONG32,GetNumThresholds)(THIS) PURE;
  249. };
  250. /****************************************************************************
  251.  * 
  252.  *  Interface:
  253.  *
  254.  * IHXStreamBandwidthBias
  255.  *
  256.  *  Purpose:
  257.  *
  258.  * Implemented by the ASM stmeams (queried from IHXStream)
  259.  * in order to set/get the current bias factor for
  260.  *      allocation.
  261.  *
  262.  *  IID_IHXStreamBandwidthBias:
  263.  *
  264.  * {00000804-b4c8-11d0-9995-00a0248da5f0}
  265.  *
  266.  */
  267. DEFINE_GUID(IID_IHXStreamBandwidthBias, 0x00000804, 0xb4c8, 0x11d0,
  268.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  269. #undef  INTERFACE
  270. #define INTERFACE   IHXStreamBandwidthBias
  271. DECLARE_INTERFACE_(IHXStreamBandwidthBias, IUnknown)
  272. {
  273.     /*
  274.      * IUnknown methods
  275.      */
  276.     STDMETHOD(QueryInterface) (THIS_
  277. REFIID riid,
  278. void** ppvObj) PURE;
  279.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  280.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  281.     /*
  282.      * IHXStreamBandwidthBias methods
  283.      */
  284.     STDMETHOD(GetBiasFactor) (THIS_
  285. REF(INT32) lBiasFactor) PURE;
  286.     STDMETHOD(SetBiasFactor) (THIS_
  287. INT32 lBiasFactor) PURE;
  288. };
  289. /****************************************************************************
  290.  * 
  291.  *  Interface:
  292.  *
  293.  * IHXThinnableSource
  294.  *
  295.  *  Purpose:
  296.  *
  297.  * Implemented by protocols that allow infinite thinnability through
  298.  *      LimitBandwidthByDropping
  299.  *
  300.  *  IID_IHXThinnableSource
  301.  *
  302.  * {00000805-b4c8-11d0-9995-00a0248da5f0}
  303.  *
  304.  */
  305. DEFINE_GUID(IID_IHXThinnableSource, 0x00000805, 0xb4c8, 0x11d0,
  306.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  307. #undef  INTERFACE
  308. #define INTERFACE   IHXThinnableSource
  309. DECLARE_INTERFACE_(IHXThinnableSource, IUnknown)
  310. {
  311.     /*
  312.      * IUnknown methods
  313.      */
  314.     STDMETHOD(QueryInterface) (THIS_
  315. REFIID riid,
  316. void** ppvObj) PURE;
  317.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  318.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  319.     /*
  320.      * IHXThinnableSource methods
  321.      */
  322.     STDMETHOD(LimitBandwidthByDropping) (THIS_
  323. UINT32 ulStreamNo,
  324. UINT32 ulBandwidthLimit) PURE;
  325.     STDMETHOD(SetDeliveryBandwidth) (THIS_
  326. UINT32 ulBandwidth,
  327. UINT32 ulMsBackOff) PURE;
  328. };
  329. /****************************************************************************
  330.  * 
  331.  *  Interface:
  332.  *
  333.  * IHXBandwidthNudger
  334.  *
  335.  *  Purpose:
  336.  *
  337.  * Implemented by the ASM Bandwidth manager (query off IHXPlayer).
  338.  *      This interface allows you to artifically simulate bandwidth
  339.  * constrained conditions.
  340.  *
  341.  *  IID_IHXBandwidthNudger
  342.  *
  343.  * {00000806-b4c8-11d0-9995-00a0248da5f0}
  344.  *
  345.  */
  346. DEFINE_GUID(IID_IHXBandwidthNudger, 0x00000806, 0xb4c8, 0x11d0,
  347.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  348. #undef  INTERFACE
  349. #define INTERFACE   IHXBandwidthNudger
  350. DECLARE_INTERFACE_(IHXBandwidthNudger, IUnknown)
  351. {
  352.     /*
  353.      * IUnknown methods
  354.      */
  355.     STDMETHOD(QueryInterface) (THIS_
  356. REFIID riid,
  357. void** ppvObj) PURE;
  358.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  359.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  360.     /*
  361.      * IHXBandwidthNudger methods
  362.      */
  363.     STDMETHOD(GetBandwidth) (THIS_
  364. REF(UINT32) ulBandwidth) PURE;
  365.     STDMETHOD(SetBandwidth) (THIS_
  366. UINT32 ulBandwidth) PURE;
  367. };
  368. /****************************************************************************
  369.  * 
  370.  *  Interface:
  371.  *
  372.  * IHXASMProps
  373.  *
  374.  *  Purpose:
  375.  *
  376.  * Implemented by the ASM Stream Object (query off IHXStream).
  377.  *      This interface allows you to get the current predata as stated
  378.  * in the rulebook.
  379.  *
  380.  *  IID_IHXASMProps
  381.  *
  382.  * {00000807-b4c8-11d0-9995-00a0248da5f0}
  383.  *
  384.  */
  385. DEFINE_GUID(IID_IHXASMProps, 0x00000807, 0xb4c8, 0x11d0,
  386.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  387. #undef  INTERFACE
  388. #define INTERFACE   IHXASMProps
  389. DECLARE_INTERFACE_(IHXASMProps, IUnknown)
  390. {
  391.     /*
  392.      * IUnknown methods
  393.      */
  394.     STDMETHOD(QueryInterface) (THIS_
  395. REFIID riid,
  396. void** ppvObj) PURE;
  397.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  398.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  399.     /*
  400.      * IHXASMProps methods
  401.      */
  402.     STDMETHOD(GetPreData) (THIS_
  403. REF(UINT32) ulPreData) PURE;
  404.     STDMETHOD(GetBandwidth) (THIS_
  405. REF(UINT32) ulBandwidth) PURE;
  406. };
  407. /****************************************************************************
  408.  * 
  409.  *  Interface:
  410.  *
  411.  * IHXAtomicRuleChange
  412.  *
  413.  *  Purpose:
  414.  *
  415.  * Implemented by the RTSP layer in rmacore.
  416.  *      This interface allows you to atomically subscribe and unsubscribe
  417.  * to a bunch of rules.
  418.  *
  419.  *  IID_IHXAtomicRuleChange
  420.  *
  421.  * {00000808-b4c8-11d0-9995-00a0248da5f0}
  422.  *
  423.  */
  424. DEFINE_GUID(IID_IHXAtomicRuleChange, 0x00000808, 0xb4c8, 0x11d0,
  425.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  426. #undef  INTERFACE
  427. #define INTERFACE   IHXAtomicRuleChange
  428. DECLARE_INTERFACE_(IHXAtomicRuleChange, IUnknown)
  429. {
  430.     /*
  431.      * IUnknown methods
  432.      */
  433.     STDMETHOD(QueryInterface) (THIS_
  434. REFIID riid,
  435. void** ppvObj) PURE;
  436.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  437.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  438.     /*
  439.      * IHXAtomicRuleChange methods
  440.      */
  441.     STDMETHOD(RuleChange)    (THIS_
  442.      REF(CHXSimpleList) RuleChanges) PURE;
  443. };
  444. /****************************************************************************
  445.  * 
  446.  *  Interface:
  447.  *
  448.  * IHXAtomicRuleGather
  449.  *
  450.  *  Purpose:
  451.  *
  452.  * Implemented by the RTSP layer in rmacore.
  453.  *      This interface allows you to atomically subscribe and unsubscribe
  454.  * to a bunch of rules.
  455.  *
  456.  *  IID_IHXAtomicRuleGather
  457.  *
  458.  * {00000809-b4c8-11d0-9995-00a0248da5f0}
  459.  *
  460.  */
  461. DEFINE_GUID(IID_IHXAtomicRuleGather, 0x00000809, 0xb4c8, 0x11d0,
  462.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  463. #undef  INTERFACE
  464. #define INTERFACE   IHXAtomicRuleGather
  465. DECLARE_INTERFACE_(IHXAtomicRuleGather, IUnknown)
  466. {
  467.     /*
  468.      * IUnknown methods
  469.      */
  470.     STDMETHOD(QueryInterface) (THIS_
  471. REFIID riid,
  472. void** ppvObj) PURE;
  473.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  474.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  475.     /*
  476.      * IHXAtomicRuleGather methods
  477.      */
  478.     STDMETHOD(RuleGather)    (THIS_
  479.      CHXSimpleList* pList) PURE;
  480.     STDMETHOD(RuleFlush)    (THIS_
  481.      CHXSimpleList* pList) PURE;
  482. };
  483. /****************************************************************************
  484.  * 
  485.  *  Interface:
  486.  *
  487.  * IHXPlayerState
  488.  *
  489.  *  Purpose:
  490.  *
  491.  * Implemented by the HXPlayer object in rmacore.
  492.  *      This interface allows you to determine if we are in a playing
  493.  * state.
  494.  *
  495.  *  IID_IHXPlayerState
  496.  *
  497.  * {0000080A-b4c8-11d0-9995-00a0248da5f0}
  498.  *
  499.  */
  500. DEFINE_GUID(IID_IHXPlayerState, 0x0000080A, 0xb4c8, 0x11d0,
  501.     0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);
  502. #undef  INTERFACE
  503. #define INTERFACE   IHXPlayerState
  504. DECLARE_INTERFACE_(IHXPlayerState, IUnknown)
  505. {
  506.     /*
  507.      * IUnknown methods
  508.      */
  509.     STDMETHOD(QueryInterface) (THIS_
  510. REFIID riid,
  511. void** ppvObj) PURE;
  512.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  513.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  514.     /*
  515.      * IHXPlayerState methods
  516.      */
  517.     STDMETHOD_(BOOL, IsPlaying)    (THIS) PURE;
  518. };
  519. #endif /* _HXSMBW_H_ */