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

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