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

Symbian

开发平台:

Visual C++

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Source last modified: $Id: hxphook.h,v 1.1.1.1.50.3 2004/07/09 01:45:12 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 _HXPHOOK_H_
  50. #define _HXPHOOK_H_
  51. /*
  52.  * Forward declarations of some interfaces defined or used here-in.
  53.  */
  54. typedef _INTERFACE IHXPacket IHXPacket;
  55. typedef _INTERFACE IHXPacketHook IHXPacketHook;
  56. typedef _INTERFACE IHXPacketHookManager IHXPacketHookManager;
  57. typedef _INTERFACE IHXPacketHookHelper IHXPacketHookHelper;
  58. typedef _INTERFACE IHXPacketHookHelperResponse    IHXPacketHookHelperResponse;
  59. typedef _INTERFACE IHXPacketHookSink IHXPacketHookSink;
  60. /****************************************************************************
  61.  * 
  62.  *  Interface:
  63.  *
  64.  * IHXPacketHook
  65.  *
  66.  *  Purpose:
  67.  *
  68.  * Interface implemented by the top level client to support selective
  69.  * record
  70.  *
  71.  *  IID_IHXPacketHook:
  72.  *
  73.  * {00002000-0901-11d1-8B06-00A024406D59}
  74.  *
  75.  */
  76. DEFINE_GUID(IID_IHXPacketHook, 0x00002000, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  77. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  78. DECLARE_INTERFACE_(IHXPacketHook, IUnknown)
  79. {
  80.     /*
  81.      * IUnknown methods
  82.      */
  83.     STDMETHOD(QueryInterface) (THIS_
  84. REFIID riid,
  85. void** ppvObj) PURE;
  86.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  87.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  88.     /*
  89.      * IHXPacketHook methods
  90.      */
  91.     /************************************************************************
  92.      * Method:
  93.      *     IHXPacketHook::OnStart
  94.      * Purpose:
  95.      *     Called by the core to notify the start of this packet hook session
  96.      */
  97.     STDMETHOD(OnStart) (THIS) PURE;
  98.     /************************************************************************
  99.      * Method:
  100.      *     IHXPacketHook::OnEnd
  101.      * Purpose:
  102.      *     Called by the core to notify the end of this packet hook session
  103.      */
  104.     STDMETHOD(OnEnd) (THIS) PURE;
  105.     /************************************************************************
  106.      * Method:
  107.      *     IHXPacketHook::OnFileHeader
  108.      * Purpose:
  109.      *     Called by the core to send file header information
  110.      *
  111.      */
  112.     STDMETHOD(OnFileHeader) (THIS_
  113. IHXValues* pValues) PURE;
  114.     /************************************************************************
  115.      * Method:
  116.      *     IHXPacketHook::OnStreamHeader
  117.      * Purpose:
  118.      *     Called by the core to send stream header information
  119.      *
  120.      */
  121.     STDMETHOD(OnStreamHeader) (THIS_
  122. IHXValues* pValues) PURE;
  123.     /************************************************************************
  124.      * Method:
  125.      *     IHXPacketHook:OnPacket
  126.      * Purpose:
  127.      *     Called by the core to send packet information.
  128.      *
  129.      */
  130.     STDMETHOD(OnPacket) (THIS_
  131. IHXPacket* pPacket) PURE;
  132. };
  133. /****************************************************************************
  134.  * 
  135.  *  Interface:
  136.  *
  137.  * IHXPacketHookManager
  138.  *
  139.  *  Purpose:
  140.  *
  141.  * Interface to the selective record
  142.  *
  143.  *  IID_IHXPacketHookManager
  144.  *
  145.  * {00002001-0901-11d1-8B06-00A024406D59}
  146.  */
  147. DEFINE_GUID(IID_IHXPacketHookManager, 0x00002001, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  148. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  149. #undef  INTERFACE
  150. #define INTERFACE   IHXPacketHookManager
  151. DECLARE_INTERFACE_(IHXPacketHookManager, IUnknown)
  152. {
  153.     /*
  154.      * IUnknown methods
  155.      */
  156.     STDMETHOD(QueryInterface) (THIS_
  157. REFIID riid,
  158. void** ppvObj) PURE;
  159.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  160.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  161.     /*
  162.      * IHXPacketHookManager methods
  163.      */
  164.     /************************************************************************
  165.      * Method:
  166.      *     IHXPacketHookManager::InitHook
  167.      * Purpose:
  168.      *     called by the top level client to pass the IHXPacketHook object
  169.      */
  170.     STDMETHOD(InitHook) (THIS_
  171. IHXPacketHook* pPacketHook) PURE;
  172.     /************************************************************************
  173.      * Method:
  174.      *     IHXPacketHookManager::CloseHook
  175.      * Purpose:
  176.      *     called by the top level client to close the hook connection
  177.      */
  178.     STDMETHOD(CloseHook) (THIS) PURE;
  179.     /************************************************************************
  180.      * Method:
  181.      *     IHXPacketHookManager::StartHook
  182.      * Purpose:
  183.      *     called by the top level client to start recording
  184.      */
  185.     STDMETHOD(StartHook) (THIS) PURE;
  186.     /************************************************************************
  187.      * Method:
  188.      *     IHXPacketHookManager::StopHook
  189.      * Purpose:
  190.      *     called by the top level client to stop recording
  191.      */
  192.     STDMETHOD(StopHook) (THIS) PURE;
  193. };
  194. /****************************************************************************
  195.  * 
  196.  *  Interface:
  197.  * 
  198.  * IHXPacketHookHelper
  199.  * 
  200.  *  Purpose:
  201.  * 
  202.  * provide methods to prepare the packet for recording and send back the core
  203.  * 
  204.  *  IID_IHXPacketHookHelper:
  205.  * 
  206.  * {00002002-0901-11d1-8B06-00A024406D59}
  207.  * 
  208.  */
  209. DEFINE_GUID(IID_IHXPacketHookHelper, 0x00002002, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  210. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  211. #undef  INTERFACE
  212. #define INTERFACE   IHXPacketHookHelper
  213. DECLARE_INTERFACE_(IHXPacketHookHelper, IUnknown)
  214. {
  215.     /*
  216.      * IUnknown methods
  217.      */
  218.     STDMETHOD(QueryInterface) (THIS_
  219. REFIID riid,
  220. void** ppvObj) PURE;
  221.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  222.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  223.     /*
  224.      * IHXPacketHookHelper methods
  225.      */
  226.     /******************************************************************
  227.      * Method:
  228.      *     IHXPacketHookHelper::StartHook
  229.      *
  230.      * Purpose:
  231.      *    tell the renderer to start sending the record packets
  232.      *
  233.      */
  234.     STDMETHOD(StartHook) (THIS_
  235. ULONG32 ulStreamNumber,
  236. ULONG32 ulTimeOffset,
  237. IHXPacketHookHelperResponse* pPacketHookHelperResponse) PURE;
  238.     /******************************************************************
  239.      * Method:
  240.      *    IHXPacketHookHelper::StopHook
  241.      *
  242.      * Purpose:
  243.      *    tell the renderer to stop sending the record packets
  244.      */
  245.     STDMETHOD(StopHook) (THIS) PURE;
  246. };
  247. /****************************************************************************
  248.  * 
  249.  *  Interface:
  250.  *
  251.  * IHXPacketHookHelperResponse
  252.  *
  253.  *  Purpose:
  254.  *
  255.  * Response interface to the IHXPacketHookHelper at renderer
  256.  *
  257.  *  IID_IHXPacketHookHelperResponse
  258.  *
  259.  * {00002003-0901-11d1-8B06-00A024406D59}
  260.  */
  261. DEFINE_GUID(IID_IHXPacketHookHelperResponse, 0x00002003, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  262. 0xa0, 0x24, 0x40, 0x6d, 0x59);
  263. #undef  INTERFACE
  264. #define INTERFACE   IHXPacketHookHelperResponse
  265. DECLARE_INTERFACE_(IHXPacketHookHelperResponse, IUnknown)
  266. {
  267.     /*
  268.      * IUnknown methods
  269.      */
  270.     STDMETHOD(QueryInterface) (THIS_
  271. REFIID riid,
  272. void** ppvObj) PURE;
  273.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  274.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  275.     /*
  276.      * IHXPacketHookHelperResponse methods
  277.      */
  278.     /************************************************************************
  279.      * Method:
  280.      *     IHXPacketHookHelperResponse::OnPacket
  281.      * Purpose:
  282.      *     called by the renderer to pass the packet for recording
  283.      */
  284.     STDMETHOD(OnPacket) (THIS_
  285. IHXPacket* pPacket) PURE;
  286.     /************************************************************************
  287.      * Method:
  288.      *     IHXPacketHookManager::OnEndOfPackets
  289.      * Purpose:
  290.      *     called by the renderer to notify the end of this stream
  291.      */
  292.     STDMETHOD(OnEndOfPackets) (THIS) PURE;
  293. };
  294. /****************************************************************************
  295.  * 
  296.  *  Interface:
  297.  * 
  298.  * IHXPacketHookSink
  299.  * 
  300.  *  Purpose:
  301.  * 
  302.  * provide a sink to catch pre-hook packets
  303.  * 
  304.  *  IID_IHXPacketHookSink:
  305.  * 
  306.  * {00002004-0901-11d1-8B06-00A024406D59}
  307.  * 
  308.  */
  309. DEFINE_GUID(IID_IHXPacketHookSink, 0x00002004, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  310. #undef  INTERFACE
  311. #define INTERFACE   IHXPacketHookSink
  312. DECLARE_INTERFACE_(IHXPacketHookSink, IUnknown)
  313. {
  314.     /*
  315.      * IUnknown methods
  316.      */
  317.     STDMETHOD(QueryInterface) (THIS_
  318. REFIID riid,
  319. void** ppvObj) PURE;
  320.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  321.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  322.     /*
  323.      * IHXPacketHookSink methods
  324.      */
  325.     /******************************************************************
  326.      * Method:
  327.      *     IHXPacketHookSink::StartSink
  328.      *
  329.      * Purpose:
  330.      *    tell the renderer to start collection pre-record packets
  331.      *
  332.      */
  333.     STDMETHOD(StartSink) (THIS) PURE;
  334.     /******************************************************************
  335.      * Method:
  336.      *    IHXPacketHookHelper::StopHook
  337.      *
  338.      * Purpose:
  339.      *    tell the renderer to stop collection pre-record packets
  340.      */
  341.     STDMETHOD(StopSink) (THIS) PURE;
  342. };
  343. /****************************************************************************
  344.  * 
  345.  *  Interface:
  346.  * 
  347.  * IHXRecordTimeline
  348.  * 
  349.  *  Purpose:
  350.  * 
  351.  * provide a sink to catch pre-hook packets
  352.  * 
  353.  *  IID_IHXRecordTimeline:
  354.  * 
  355.  * {00002005-0901-11d1-8B06-00A024406D59}
  356.  * 
  357.  */
  358. DEFINE_GUID(IID_IHXRecordTimeline, 0x00002005, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
  359. #undef  INTERFACE
  360. #define INTERFACE   IHXRecordTimeline
  361. DECLARE_INTERFACE_(IHXRecordTimeline, IUnknown)
  362. {
  363.     /******************************************************************
  364.      * Method:
  365.      *     IHXRecordTimeline::GetRecordPos
  366.      *
  367.      * Purpose:
  368.      *    translates playback position into current recording position.
  369.      *
  370.      */
  371.     STDMETHOD_(UINT32, GetRecordPos) (THIS_ UINT32 nPlayPos) PURE;
  372.     /******************************************************************
  373.      * Method:
  374.      *    IHXRecordTimeline::SetRecordStartPos
  375.      *
  376.      * Purpose:
  377.      *    requests to start recording from a nPlayPos playback position.
  378.      *   Renderer might use this method when key-frame rules require
  379.      *    to start recoding earlier then requested by user.
  380.      */
  381.     STDMETHOD_(void, SetRecordStartPos) (THIS_ UINT32 nPlayPos) PURE;
  382.     /******************************************************************
  383.      * Method:
  384.      *    IHXRecordTimeline::OnPlaybackPos
  385.      *
  386.      * Purpose:
  387.      *    sends current playback position to recording timeline.
  388.      */
  389.     STDMETHOD_(void, OnPlaybackPos) (THIS_ UINT32 nPlayPos) PURE;
  390.     /******************************************************************
  391.      * Method:
  392.      *    IHXRecordTimeline::IsRecordStartPosSet
  393.      *
  394.      * Purpose:
  395.      *    returns TRUE if recording start position is set and not going to 
  396.      *   be changed by any renderer.
  397.      */
  398.     STDMETHOD_(BOOL, RecordStartPosFixed) (THIS) PURE;
  399.     /******************************************************************
  400.      * Method:
  401.      *    IHXRecordTimeline::AdjustRecordTimeline
  402.      *
  403.      * Purpose:
  404.      *    allows to adjust recording timeline when seeking while 
  405.      *   recording.
  406.      */
  407.     STDMETHOD_(void, AdjustRecordTimeline) (THIS_ INT32 nAdjustment) PURE;
  408. };
  409. #endif /* _HXPHOOK_H_ */