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

Symbian

开发平台:

Visual C++

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Source last modified: $Id: hxstats.h,v 1.11.2.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. ///////////////////////////////////////////////////////////////////////////////
  50. // hxstats.h - Client stats interfaces. 
  51. ///////////////////////////////////////////////////////////////////////////////
  52. #ifndef HXSTATS_H
  53. #define HXSTATS_H
  54. ///////////////////////////////////////////////////////////////////////////////
  55. // INCLUDES
  56. ///////////////////////////////////////////////////////////////////////////////
  57. #include <limits.h>
  58. ///////////////////////////////////////////////////////////////////////////////
  59. // ClientStatsEvent
  60. ///////////////////////////////////////////////////////////////////////////////
  61. typedef enum 
  62. {
  63.     CSEVENT_UNKNOWN,
  64.     CSEVENT_CLIENT_CONNECT,
  65.     CSEVENT_CLIENT_DISCONNECT,
  66.     CSEVENT_SESSION_DONE,
  67.     CSEVENT_TIMER,
  68.     CSEVENT_SESSION_SETURL
  69. } ClientStatsEvent;
  70. ///////////////////////////////////////////////////////////////////////////////
  71. _INTERFACE      IUnknown;
  72. _INTERFACE      IHXBuffer;
  73. _INTERFACE      IHXQoSTransportAdaptationInfo;
  74. _INTERFACE      IHXQoSSessionAdaptationInfo;
  75. _INTERFACE      IHXQoSApplicationAdaptationInfo;
  76. _INTERFACE      IHXClientProfileInfo;
  77. _INTERFACE      IHXClientStats;
  78. _INTERFACE      IHXSessionStats;
  79. _INTERFACE      IHXClientStatsSink;
  80. _INTERFACE      IHXClientStatsManager;
  81. ///////////////////////////////////////////////////////////////////////////////
  82. // Interface: 
  83. //
  84. //      IHXSessionStats
  85. //
  86. // Purpose:
  87. //
  88. //      Allows access to session statistics. 
  89. //
  90. // IID_IHXSessionStats:
  91. //
  92. //      {3C02C47F-6F44-47fd-B625-C81A2BF05D4F}
  93. //
  94. ///////////////////////////////////////////////////////////////////////////////
  95. // {3C02C47F-6F44-47fd-B625-C81A2BF05D4F}
  96. DEFINE_GUID(IID_IHXSessionStats, 0x3c02c47f, 0x6f44, 0x47fd, 0xb6, 
  97.             0x25, 0xc8, 0x1a, 0x2b, 0xf0, 0x5d, 0x4f);
  98. #define CLSID_IHXSessionStats     IID_IHXSessionStats
  99. #undef  INTERFACE
  100. #define INTERFACE   IHXSessionStats
  101. ///////////////////////////////////////////////////////////////////////////////
  102. // End Status Values
  103. ///////////////////////////////////////////////////////////////////////////////
  104. /*
  105.  * First bit indicates success/error.
  106.  * Next two bits indicate error source: server, client, + room for expansion
  107.  *
  108.  * 000  No error
  109.  * 100  Client/remote-socket error
  110.  * 101  Server error
  111.  * 110  Undetermined
  112.  * 111  Reserved
  113.  */
  114. #define SSES_ERROR_MASK               0xE0000000
  115. #define SSES_CLIENT_ERROR_VALUE       0x80000000
  116. #define SSES_SERVER_ERROR_VALUE       0xA0000000
  117. #define SSES_UNDETERMINED_ERROR_VALUE 0xC0000000
  118. #define SSES_SUCCESS(x) (!((x) & 0x80000000))
  119. #define SSES_FAILURE(x)   ((x) & 0x80000000)
  120. #define SSES_FAILURE_CLIENT(x)  (((x) & SSES_ERROR_MASK) == SSES_CLIENT_ERROR_VALUE)
  121. #define SSES_FAILURE_SERVER(x)  (((x) & SSES_ERROR_MASK) == SSES_SERVER_ERROR_VALUE)
  122. #define SSES_FAILURE_UNDETERMINED(x)  
  123.                           (((x) & SSES_ERROR_MASK) == SSES_UNDETERMINED_ERROR_VALUE)
  124. typedef enum
  125. {
  126.     // success codes
  127.     SSES_OK=0,
  128.     // client errors
  129.     SSES_SOCKET_CLOSED        =0x80000000,
  130.     SSES_CLIENT_TIMEOUT       =0x80000001,
  131.     SSES_INVALID_FILE         =0x80000002,
  132.     // server errors
  133.     SSES_SERVER_INTERNAL_ERROR=0xA0000000,
  134.     SSES_SERVER_ALERT         =0xA0000001,
  135.     SSES_SOCKET_BLOCKED       =0xA0000002,
  136.     SSES_REDIRECTED           =0xA0000003,
  137.     // indeterminate errors
  138.     SSES_UNKNOWN_ERROR=0xC0000000,
  139.     SSES_NOT_ENDED=0xffffffff // session still active, no end status yet
  140. } SessionStatsEndStatus;
  141. DECLARE_INTERFACE_(IHXSessionStats, IUnknown)
  142. {
  143.     // IUnknown methods
  144.     STDMETHOD(QueryInterface)               (THIS_
  145.                                             REFIID riid,
  146.                                             void** ppvObj) PURE;
  147.     STDMETHOD_(UINT32,AddRef)               (THIS) PURE;
  148.     STDMETHOD_(UINT32,Release)              (THIS) PURE;
  149.     STDMETHOD_(UINT32, GetID)               (THIS) PURE;
  150.     STDMETHOD(SetID)                        (THIS_
  151.                                             UINT32 ulID) PURE;
  152.     // IHXSessionStats methods.
  153.     ///////////////////////////////////////////////////////////////////////////
  154.     // Statistics accessor/mutator methods.
  155.     //
  156.     // Purpose:
  157.     //      All used to either acquire a property value or set it.
  158.     //
  159.     // Arguments:
  160.     //      Mutators take an IN parameter, the new value to set the property
  161.     //      to. Accessors take nothing.
  162.     ///////////////////////////////////////////////////////////////////////////
  163.     STDMETHOD_(IHXClientStats*, GetClient) (THIS) PURE;
  164.     STDMETHOD(SetClient)                    (THIS_ 
  165.                                             IHXClientStats* pClient) PURE;
  166.     STDMETHOD_(IHXBuffer*, GetHost)         (THIS) PURE;
  167.     STDMETHOD(SetHost)                      (THIS_
  168.                                             IHXBuffer* pHost) PURE;
  169.     STDMETHOD_(IHXBuffer*, GetSessionStartTime) (THIS) PURE;
  170.     STDMETHOD(SetSessionStartTime)              (THIS_
  171.                                                 IHXBuffer* pSessionStartTime) PURE;
  172.     STDMETHOD_(IHXBuffer*, GetURL)          (THIS) PURE;
  173.     STDMETHOD(SetURL)                       (THIS_
  174.                                              IHXBuffer* pURL)       PURE;
  175.     STDMETHOD_(IHXBuffer*, GetLogURL)          (THIS) PURE;
  176.     STDMETHOD(SetLogURL)                       (THIS_
  177.                                              IHXBuffer* pLogURL)       PURE;
  178.     STDMETHOD_(IHXBuffer*, GetLogStats)     (THIS) PURE;
  179.     STDMETHOD(SetLogStats)                  (THIS_
  180.                                             IHXBuffer* pLogStats) PURE;
  181.     STDMETHOD_(IHXBuffer*, GetPlayerRequestedURL)   (THIS) PURE;
  182.     STDMETHOD(SetPlayerRequestedURL)                (THIS_
  183.                                                     IHXBuffer* pPlayerRequestedURL) PURE;
  184.     STDMETHOD_(IHXBuffer*, GetSalt)         (THIS) PURE;
  185.     STDMETHOD(SetSalt)                      (THIS_
  186.                                             IHXBuffer* pSalt) PURE;
  187.     STDMETHOD_(IHXBuffer*, GetAuth)         (THIS) PURE;
  188.     STDMETHOD(SetAuth)                      (THIS_
  189.                                             IHXBuffer* pAuth) PURE;
  190.     STDMETHOD_(IHXBuffer*, GetProxyConnectionType)   (THIS) PURE;
  191.     STDMETHOD(SetProxyConnectionType)                (THIS_
  192.                                                      IHXBuffer* pProxyConnectionType) PURE;
  193.     STDMETHOD_(IHXBuffer*, GetInterfaceAddr)    (THIS) PURE;
  194.     STDMETHOD(SetInterfaceAddr)                 (THIS_
  195.                                                 IHXBuffer* pInterfaceAddr) PURE;
  196.     STDMETHOD_(UINT64, GetFileSize)         (THIS) PURE;
  197.     STDMETHOD(SetFileSize)                  (THIS_
  198.                                             UINT64 ulFileSize) PURE;
  199.     STDMETHOD_(UINT32, GetStatus)            (THIS) PURE;
  200.     STDMETHOD(SetStatus)                    (THIS_
  201.                                             UINT32 ulHTTPStatus) PURE;
  202.     STDMETHOD_(SessionStatsEndStatus, GetEndStatus)   (THIS) PURE;
  203.     STDMETHOD(SetEndStatus)                 (THIS_
  204.                                             SessionStatsEndStatus ulEndStatus) PURE;
  205.     STDMETHOD_(UINT32, GetDuration)         (THIS) PURE;
  206.     STDMETHOD(SetDuration)                  (THIS_
  207.                                             UINT32 ulDuration) PURE;
  208.     STDMETHOD_(UINT32, GetAvgBitrate)       (THIS) PURE;
  209.     STDMETHOD(SetAvgBitrate)                (THIS_
  210.                                             UINT32 ulAvgBitrate) PURE;
  211.     STDMETHOD_(UINT32, GetSendingTime)      (THIS) PURE;
  212.     STDMETHOD(SetSendingTime)               (THIS_
  213.                                             UINT32 ulSendingTime) PURE;
  214.     STDMETHOD_(UINT32, GetPlayTime)         (THIS) PURE;
  215.     STDMETHOD(SetPlayTime)                  (THIS_
  216.                                             UINT32 ulPlayTime) PURE;
  217.     STDMETHOD_(BOOL, IsUDP)                 (THIS) PURE;
  218.     STDMETHOD(SetUDP)                       (THIS_
  219.                                              BOOL bIsUDP) PURE;
  220.     STDMETHOD_(BOOL, IsRVStreamFound)                 (THIS) PURE;
  221.     STDMETHOD(SetRVStreamFound)                       (THIS_
  222.                                              BOOL bIsRVStreamFound) PURE;
  223.     STDMETHOD_(BOOL, IsRAStreamFound)                 (THIS) PURE;
  224.     STDMETHOD(SetRAStreamFound)                       (THIS_
  225.                                              BOOL bIsRAStreamFound) PURE;
  226.     STDMETHOD_(BOOL, IsREStreamFound)                 (THIS) PURE;
  227.     STDMETHOD(SetREStreamFound)                       (THIS_
  228.                                              BOOL bIsREStreamFound) PURE;
  229.     STDMETHOD_(BOOL, IsRIStreamFound)                 (THIS) PURE;
  230.     STDMETHOD(SetRIStreamFound)                       (THIS_
  231.                                              BOOL bIsRIStreamFound) PURE;
  232.     STDMETHOD_(BOOL, IsMulticastUsed)       (THIS) PURE;
  233.     STDMETHOD(SetMulticastUsed)             (THIS_
  234.                                             BOOL bIsMulticastUsed) PURE;
  235.     STDMETHOD_(UINT16, GetXWapProfileStatus) (THIS) PURE;
  236.     STDMETHOD(SetXWapProfileStatus)         (THIS_ 
  237.                                             UINT16 unXWapProfileStatus) PURE;
  238.     STDMETHOD(GetClientProfileInfo)         (THIS_  
  239.                                             REF(IHXClientProfileInfo*) pInfo) PURE;
  240.     STDMETHOD(SetClientProfileInfo)         (THIS_  
  241.                                             IHXClientProfileInfo* pInfo) PURE;
  242.     STDMETHOD_(IHXBuffer*, GetClientProfileURIs)    (THIS) PURE;
  243.     STDMETHOD(SetClientProfileURIs)                 (THIS_ 
  244.                                                     IHXBuffer* pURIs) PURE;
  245.     STDMETHOD_(IHXQoSTransportAdaptationInfo*, GetQoSTransportAdaptationInfo)       (THIS) PURE;
  246.     STDMETHOD(SetQoSTransportAdaptationInfo)                                        (THIS_
  247.                                                                                      IHXQoSTransportAdaptationInfo* pInfo) PURE;
  248.     STDMETHOD_(IHXQoSSessionAdaptationInfo*, GetQoSSessionAdaptationInfo)       (THIS) PURE;
  249.     STDMETHOD(SetQoSSessionAdaptationInfo)                                      (THIS_
  250.                                                                                  IHXQoSSessionAdaptationInfo* pInfo) PURE;
  251.     STDMETHOD_(IHXQoSApplicationAdaptationInfo*, GetQoSApplicationAdaptationInfo)       (THIS) PURE;
  252.     STDMETHOD(SetQoSApplicationAdaptationInfo)                                          (THIS_
  253.                                                                                          IHXQoSApplicationAdaptationInfo* pInfo) PURE;
  254. };
  255. ///////////////////////////////////////////////////////////////////////////////
  256. // Interface: 
  257. //
  258. //      IHXClientStats
  259. //
  260. // Purpose:
  261. //
  262. //      Allows access to client statistics. 
  263. //
  264. // IID_IHXClientStats:
  265. //
  266. //      {83CE47E8-3EBE-450a-BF49-66D88094E516}
  267. //
  268. ///////////////////////////////////////////////////////////////////////////////
  269. // {83CE47E8-3EBE-450a-BF49-66D88094E516}
  270. DEFINE_GUID(IID_IHXClientStats, 0x83ce47e8, 0x3ebe, 0x450a, 
  271.             0xbf, 0x49, 0x66, 0xd8, 0x80, 0x94, 0xe5, 0x16);
  272. #define CLSID_IHXClientStats     IID_IHXClientStats
  273. #undef  INTERFACE
  274. #define INTERFACE   IHXClientStats
  275. DECLARE_INTERFACE_(IHXClientStats, IUnknown)
  276. {
  277.     // IUnknown methods
  278.     STDMETHOD(QueryInterface)               (THIS_
  279.                                             REFIID riid,
  280.                                             void** ppvObj) PURE;
  281.     STDMETHOD_(UINT32,AddRef)               (THIS) PURE;
  282.  
  283.     STDMETHOD_(UINT32,Release)              (THIS) PURE;
  284.     // IHXClientStats methods
  285.     STDMETHOD_(IHXClientStatsManager*, GetStatsManager) (THIS) PURE;
  286.     STDMETHOD(SetStatsManager) (THIS_ IHXClientStatsManager* pStatsMgr) PURE;
  287.     ///////////////////////////////////////////////////////////////////////////
  288.     // Statistics accessor/mutator methods.
  289.     //
  290.     // Purpose:
  291.     //      All used to either acquire a property value or set it.
  292.     //
  293.     // Arguments:
  294.     //      Mutators take an IN parameter, the new value to set the property
  295.     //      to. Accessors take nothing.
  296.     ///////////////////////////////////////////////////////////////////////////
  297.     STDMETHOD_(IHXBuffer*, GetIPAddress)    (THIS) PURE;
  298.     STDMETHOD(SetIPAddress)                 (THIS_
  299.                                             IHXBuffer* pIPAddress) PURE;
  300.     STDMETHOD_(IHXBuffer*, GetCBID)         (THIS) PURE;
  301.     STDMETHOD(SetCBID)                      (THIS_
  302.                                             IHXBuffer* pCBID) PURE;
  303.     STDMETHOD_(IHXBuffer*, GetGUID)         (THIS) PURE;
  304.     STDMETHOD(SetGUID)                      (THIS_
  305.                                             IHXBuffer* pGUID) PURE;
  306.     STDMETHOD_(IHXBuffer*, GetClientID)     (THIS) PURE;
  307.     STDMETHOD(SetClientID)                  (THIS_
  308.                                             IHXBuffer* pClientID) PURE;
  309.     STDMETHOD_(IHXBuffer*, GetPNAClientID)  (THIS) PURE;
  310.     STDMETHOD(SetPNAClientID)               (THIS_
  311.                                              IHXBuffer* pPNAClientID) PURE;
  312.     STDMETHOD_(IHXBuffer*, GetCompanyID)     (THIS) PURE;
  313.     STDMETHOD(SetCompanyID)                  (THIS_
  314.                                              IHXBuffer* pCompanyID) PURE;
  315.     STDMETHOD_(IHXBuffer*, GetClientChallenge)     (THIS) PURE;
  316.     STDMETHOD(SetClientChallenge)                  (THIS_
  317.                                                    IHXBuffer* pClientChallenge) PURE;
  318.     STDMETHOD_(IHXBuffer*, GetLanguage)     (THIS) PURE;
  319.     STDMETHOD(SetLanguage)                  (THIS_
  320.                                              IHXBuffer* pLanguage) PURE;
  321.     STDMETHOD_(IHXBuffer*, GetPlayerStartTime) (THIS) PURE;
  322.     STDMETHOD(SetPlayerStartTime)              (THIS_
  323.                                                IHXBuffer* pPlayerStartTime) PURE;
  324.     STDMETHOD_(IHXBuffer*, GetProtocol)     (THIS) PURE;
  325.     STDMETHOD(SetProtocol)                  (THIS_
  326.                                             IHXBuffer* pProtocol) PURE;
  327.     STDMETHOD_(IHXBuffer*, GetStartTime)    (THIS) PURE;
  328.     STDMETHOD(SetStartTime)                 (IHXBuffer* pStartTime) PURE;
  329.     STDMETHOD_(IHXBuffer*, GetRequestMethod)    (THIS) PURE;
  330.     STDMETHOD(SetRequestMethod)                 (IHXBuffer* pRequestMethod) PURE;
  331.     STDMETHOD_(IHXBuffer*, GetUserAgent)    (THIS) PURE;
  332.     STDMETHOD(SetUserAgent)                 (THIS_ 
  333.                                             IHXBuffer* pUserAgent) PURE;
  334.     STDMETHOD_(IHXBuffer*, GetVersion)      (THIS) PURE;
  335.     STDMETHOD(SetVersion)                   (THIS_
  336.                                             IHXBuffer* pVersion) PURE;
  337.     STDMETHOD_(IHXBuffer*, GetLoadTestPassword)     (THIS) PURE;
  338.     STDMETHOD(SetLoadTestPassword)                  (THIS_
  339.                                                     IHXBuffer* pLoadTestPassword) PURE;
  340.     STDMETHOD_(IHXBuffer*, GetRTSPEvents)   (THIS) PURE;
  341.     STDMETHOD(SetRTSPEvents)                (THIS_
  342.                                             IHXBuffer* pRTSPEvents) PURE;
  343.     STDMETHOD_(UINT64, GetControlBytesSent) (THIS) PURE;
  344.     STDMETHOD(SetControlBytesSent)          (THIS_
  345.                                             UINT64 ulControlBytesSent) PURE;
  346.     STDMETHOD_(UINT32, GetPort)             (THIS) PURE;
  347.     STDMETHOD(SetPort)                      (THIS_
  348.                                             UINT32 ulPort) PURE;
  349.     STDMETHOD_(UINT32, GetSessionCount)     (THIS) PURE;
  350.     STDMETHOD(SetSessionCount)              (THIS_
  351.                                             UINT32 ulSessionCount) PURE;
  352.     STDMETHOD_(UINT32, GetSessionIndex)     (THIS) PURE;
  353.     STDMETHOD(SetSessionIndex)              (THIS_
  354.                                             UINT32 ulSessionIndex) PURE;
  355.     STDMETHOD_(BOOL, IsCloaked)             (THIS) PURE;
  356.     STDMETHOD(SetCloaked)                   (THIS_ 
  357.                                             BOOL bIsCloaked) PURE;
  358.     STDMETHOD_(BOOL, IsRDT)                 (THIS) PURE;
  359.     STDMETHOD(SetRDT)                       (THIS_
  360.                                             BOOL bIsRDT) PURE;
  361.     STDMETHOD_(BOOL, SupportsMaximumASMBandwidth)  (THIS) PURE;
  362.     STDMETHOD(SetSupportsMaximumASMBandwidth)      (THIS_
  363.                                                     BOOL bSupportsMaximumASMBandwidth) PURE;
  364.     STDMETHOD_(BOOL, SupportsMulticast)     (THIS) PURE;
  365.     STDMETHOD(SetSupportsMulticast)         (THIS_
  366.                                             BOOL bSupportsMulticast) PURE;
  367.     STDMETHOD_(IHXBuffer*, GetStreamSelectionInfo)  (THIS) PURE;
  368.     STDMETHOD(SetStreamSelectionInfo)               (THIS_ 
  369.                                                     IHXBuffer* pStreamSelectionInfo) PURE;
  370.     STDMETHOD_(UINT32, GetTotalMediaAdaptations)    (THIS) PURE;
  371.     STDMETHOD(SetTotalMediaAdaptations)             (THIS_ 
  372.                                                     UINT32 ulTotalMediaAdaptations) PURE;
  373.     ///////////////////////////////////////////////////////////////////////////
  374.     // Method: 
  375.     //      IHXClientStats::GetID()
  376.     // Purpose:
  377.     //      Get the id (assigned by the client stats mgr) for this client.
  378.     // Arguments:
  379.     //      void
  380.     ///////////////////////////////////////////////////////////////////////////
  381.     STDMETHOD_(UINT32, GetID)               (THIS) PURE;
  382.     
  383.     ///////////////////////////////////////////////////////////////////////////
  384.     // Method: 
  385.     //      IHXClientStats::SetID()
  386.     // Purpose:
  387.     //      Set the connection id for this client. To be called by the client
  388.     //      stats manager.
  389.     // Arguments:
  390.     //      ulConnId - conn id of client.
  391.     ///////////////////////////////////////////////////////////////////////////
  392.     STDMETHOD(SetID)                        (THIS_
  393.                                             UINT32 ulConnId) PURE;
  394.     ///////////////////////////////////////////////////////////////////////////
  395.     // Method: 
  396.     //      IHXClientStats::GetSession()
  397.     // Purpose:
  398.     //      Get the IHXSessionStats object for the provided session number.
  399.     // Arguments:
  400.     //      ulSessionId - Session number of session to get.
  401.     ///////////////////////////////////////////////////////////////////////////
  402.     STDMETHOD_(IHXSessionStats*, GetSession) (THIS_
  403.                                              UINT32 ulSessionNumber) PURE;
  404.     ///////////////////////////////////////////////////////////////////////////
  405.     // Method: 
  406.     //      IHXClientStats::RemoveSession()
  407.     // Purpose:
  408.     //      Remove the IHXSessionStats object associated with the provided 
  409.     //      session number.
  410.     // Arguments:
  411.     //      ulSessionId - Session number of session to remove.
  412.     ///////////////////////////////////////////////////////////////////////////
  413.     STDMETHOD(RemoveSession)                 (THIS_
  414.                                              UINT32 ulSessionNumber) PURE;
  415.     ///////////////////////////////////////////////////////////////////////////
  416.     // Method: 
  417.     //      IHXClientStats::AddSession()
  418.     // Purpose:
  419.     //      Add an IHXSessionStats object to list.
  420.     // Arguments:
  421.     //      pSession    - Pointer to IHXSessionStats object.
  422.     ///////////////////////////////////////////////////////////////////////////
  423.     STDMETHOD (AddSession)                   (THIS_
  424.                                              IHXSessionStats* pSession) PURE;
  425. };
  426. ///////////////////////////////////////////////////////////////////////////////
  427. // Interface: 
  428. //
  429. //      IHXClientStatsSink
  430. //
  431. // Purpose:
  432. //
  433. //      Applications wishing to receive information regarding stats from the
  434. //      client stats manager implement this interface.
  435. //
  436. // IID_IHXClientStatsSink:
  437. //
  438. //      {FDC6D1AA-D78E-40b0-A3E6-B7D6DF30383B}
  439. //
  440. ///////////////////////////////////////////////////////////////////////////////
  441. // {FDC6D1AA-D78E-40b0-A3E6-B7D6DF30383B}
  442. DEFINE_GUID(IID_IHXClientStatsSink, 0xfdc6d1aa, 0xd78e, 0x40b0, 
  443.             0xa3, 0xe6, 0xb7, 0xd6, 0xdf, 0x30, 0x38, 0x3b);
  444. #define CLSID_IHXClientStatsSink     IID_IHXClientStatsSink
  445. #undef  INTERFACE
  446. #define INTERFACE   IHXClientStatsSink
  447. DECLARE_INTERFACE_(IHXClientStatsSink, IUnknown)
  448. {
  449.     // IUnknown methods
  450.     STDMETHOD(QueryInterface)               (THIS_
  451.                                             REFIID riid,
  452.                                             void** ppvObj) PURE;
  453.     STDMETHOD_(UINT32,AddRef)               (THIS) PURE;
  454.     STDMETHOD_(UINT32,Release)              (THIS) PURE;
  455.     // IHXClientStatsSink methods
  456.     ///////////////////////////////////////////////////////////////////////////
  457.     // Method: 
  458.     //      IHXClientStatsSink::OnStatsEvent()
  459.     // Purpose:
  460.     //      Notify sinks of a Client/Session stats event
  461.     // Arguments:
  462.     //      nEvent      the id of the triggering event 
  463.     //      pClient     IHXStats object 
  464.     //      pSession    IHX stats object (== NULL for client connect/disconnect, 
  465.     //                  and timer events)
  466.     ///////////////////////////////////////////////////////////////////////////
  467.     STDMETHOD(OnStatsEvent)             (THIS_
  468.                                         ClientStatsEvent nEvent,
  469.                                         IHXClientStats* pClient,
  470.                                         IHXSessionStats* pSession) PURE;
  471.     ///////////////////////////////////////////////////////////////////////////
  472.     // Method: 
  473.     //      IHXClientStatsSink::GetStatsTimerInterval()
  474.     // Purpose:
  475.     //      Retrieve the desired timer interval from the sink for scheduling
  476.     //      callbacks with connecting clients.
  477.     // Arguments:
  478.     //      pClient - Stats object. 
  479.     ///////////////////////////////////////////////////////////////////////////
  480.     STDMETHOD_(UINT32, GetStatsTimerInterval)    (THIS) PURE;
  481. };
  482. ///////////////////////////////////////////////////////////////////////////////
  483. // Interface: 
  484. //
  485. //      IHXClientStatsManager
  486. //
  487. // Purpose:
  488. //      
  489. //      Allows plugins to access the server's client stats management system
  490. //      via the IHXContext.      
  491. //
  492. // IID_IHXClientStatsManager:
  493. //
  494. //      {E0ECE2B8-A94B-4eb4-AF0D-177D053B2ED6}
  495. //
  496. ///////////////////////////////////////////////////////////////////////////////
  497. DEFINE_GUID(IID_IHXClientStatsManager, 0xe0ece2b8, 0xa94b, 0x4eb4, 
  498.             0xaf, 0xd, 0x17, 0x7d, 0x5, 0x3b, 0x2e, 0xd6);
  499. #define CLSID_IHXClientStatsManager     IID_IHXClientStatsManager
  500. #undef  INTERFACE
  501. #define INTERFACE   IHXClientStatsManager
  502. DECLARE_INTERFACE_(IHXClientStatsManager, IUnknown)
  503. {
  504.     // IUnknown methods
  505.     STDMETHOD(QueryInterface)               (THIS_
  506.                                             REFIID riid,
  507.                                             void** ppvObj) PURE;
  508.     STDMETHOD_(UINT32,AddRef)               (THIS) PURE;
  509.     STDMETHOD_(UINT32,Release)              (THIS) PURE;
  510.     // IHXClientStatsManager methods
  511.     ///////////////////////////////////////////////////////////////////////////
  512.     // Method: 
  513.     //      IHXClientStatsManager::RegisterSink()
  514.     // Purpose:
  515.     //      Registers an IHXClientStatsSink object with the manager.
  516.     //      The sink is then able to receive notifications.
  517.     // Arguments:
  518.     //      pSink - IN - IHXClientStatsSink object to register.   
  519.     ///////////////////////////////////////////////////////////////////////////
  520.     STDMETHOD(RegisterSink)                 (THIS_
  521.                                             IHXClientStatsSink* pSink) PURE;
  522.     ///////////////////////////////////////////////////////////////////////////
  523.     // Method: 
  524.     //      IHXClientStatsManager::RemoveSink()
  525.     // Purpose:
  526.     //      Removes an IHXClientStatsSink object from the manager.
  527.     // Arguments:
  528.     //      pSink - IN - IHXClientStatsSink object to remove.   
  529.     ///////////////////////////////////////////////////////////////////////////
  530.     STDMETHOD(RemoveSink)                 (THIS_
  531.                                           IHXClientStatsSink* pSink) PURE;
  532.     ///////////////////////////////////////////////////////////////////////////
  533.     // Method: 
  534.     //      IHXClientStatsManager::GetClient()
  535.     // Purpose:
  536.     //      Returns an IHXClientStats object, given a client ID.
  537.     // Arguments:
  538.     //      ulClientId - IN - Conn id of client. 
  539.     ///////////////////////////////////////////////////////////////////////////
  540.     STDMETHOD_(IHXClientStats*, GetClient)  (THIS_
  541.                                             UINT32 ulClientId) PURE;   
  542.     ///////////////////////////////////////////////////////////////////////////
  543.     // Method: 
  544.     //      IHXClientStatsManager::AddClient()
  545.     // Purpose:
  546.     //      Adds an IHXClientStats object to the manager list. To be used
  547.     //      when clients connect.
  548.     // Arguments:
  549.     //      ulClientId - IN - Conn id of client. 
  550.     //      pClient    - IN - Pointer to clientstats object to add.
  551.     //      
  552.     ///////////////////////////////////////////////////////////////////////////
  553.     STDMETHOD(AddClient)                 (THIS_ 
  554.                                          IHXClientStats* pClient) PURE;
  555.     ///////////////////////////////////////////////////////////////////////////
  556.     // Method: 
  557.     //      IHXClientStatsManager::RemoveClient()
  558.     // Purpose:
  559.     //      Removes an IHXClientStats object from the manager list. To be used
  560.     //      when clients disconnect.
  561.     // Arguments:
  562.     //      ulClientId - Conn id of client. 
  563.     ///////////////////////////////////////////////////////////////////////////
  564.     STDMETHOD(RemoveClient)                 (THIS_ 
  565.                                             UINT32 ulClientId) PURE;
  566.     ///////////////////////////////////////////////////////////////////////////
  567.     // Method: 
  568.     //      IHXClientStatsManager::GetClientCount()
  569.     // Purpose:
  570.     //      Calls a sink back, passing info about all IHXClientStats objects 
  571.     //      that the manager currently knows about.
  572.     // Arguments:
  573.     //      pSink - IN - IHXClientStatsSink object to callback. 
  574.     ///////////////////////////////////////////////////////////////////////////
  575.     STDMETHOD_(UINT32, GetClientCount)       (THIS) PURE;
  576.     ///////////////////////////////////////////////////////////////////////////
  577.     // Method: 
  578.     //      IHXClientStatsManager::UseRegistryForStats()
  579.     // Purpose:
  580.     //      Returns TRUE if the server is configured to use the registry for
  581.     //      client stats.
  582.     // Arguments:
  583.     //      void
  584.     ///////////////////////////////////////////////////////////////////////////
  585.     STDMETHOD_(BOOL, UseRegistryForStats)  (THIS) PURE;
  586.     ///////////////////////////////////////////////////////////////////////////
  587.     // Method: 
  588.     //      IHXClientStatsManager::ScheduleSinkNotifications()
  589.     // Purpose:
  590.     //      Allows clients of the StatsMgr to notify stat sinks of important
  591.     //      state changes
  592.     // Arguments:
  593.     //      ulClientId - IN - Conn id of client. 
  594.     //      pClient    - IN - Pointer to clientstats object to add.
  595.     ///////////////////////////////////////////////////////////////////////////
  596.     STDMETHOD(ScheduleSinkNotifications)(THIS_
  597.                                      IHXClientStats* pClient, 
  598.                                      IHXSessionStats* pSession,
  599.                                      ClientStatsEvent nEvent) PURE;
  600. };
  601. #endif