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

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 _HXASM_H_
  36. #define _HXASM_H_
  37. /*
  38.  * Forward declarations of some interfaces defined here-in.
  39.  */
  40. typedef _INTERFACE IHXPacket IHXPacket;
  41. typedef _INTERFACE IHXBackChannel IHXBackChannel;
  42. typedef _INTERFACE IHXASMSource IHXASMSource;
  43. typedef _INTERFACE IHXASMStreamSink IHXASMStreamSink;
  44. typedef _INTERFACE IHXASMStream2 IHXASMStream2;
  45. typedef _INTERFACE IHXASMStream IHXASMStream;
  46. /****************************************************************************
  47.  * 
  48.  *  Interface:
  49.  * 
  50.  * IHXBackChannel
  51.  * 
  52.  *  Purpose:
  53.  * 
  54.  *      Backchannel interface to be used by renderers and implemented by
  55.  * FileFormat Plugins
  56.  * 
  57.  *  IID_IHXBackChannel:
  58.  *  
  59.  * {00001500-0901-11d1-8B06-00A024406D59}
  60.  *
  61.  */
  62. DEFINE_GUID(IID_IHXBackChannel, 0x00001500, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  63.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  64. #undef  INTERFACE
  65. #define INTERFACE   IHXBackChannel
  66. DECLARE_INTERFACE_(IHXBackChannel, IUnknown)
  67. {
  68.     /*
  69.      * IUnknown methods
  70.      */
  71.     STDMETHOD(QueryInterface)   (THIS_
  72.                                 REFIID riid,
  73.                                 void** ppvObj) PURE;
  74.     STDMETHOD_(ULONG32,AddRef)  (THIS) PURE;
  75.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  76.     /*
  77.      * IHXBackChannel method
  78.      */
  79.     /************************************************************************
  80.      * Method:
  81.      *     IHXBackChannel::PacketReady
  82.      * Purpose:
  83.      *      A back channel packet sent from Renderer to FileFormat plugin.
  84.      */
  85.     STDMETHOD(PacketReady) (THIS_
  86. IHXPacket* pPacket) PURE;
  87. };
  88. /****************************************************************************
  89.  * 
  90.  *  Interface:
  91.  *
  92.  * IHXASMSource
  93.  *
  94.  *  Purpose:
  95.  *
  96.  *      This interface is implemented by file formats so that they can
  97.  * act on ASM Subscribe and Unsubscribe actions.
  98.  *
  99.  *  IID_IHXASMSource:
  100.  *
  101.  * {00001501-0901-11d1-8B06-00A024406D59}
  102.  *
  103.  */
  104. DEFINE_GUID(IID_IHXASMSource, 0x00001501, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  105.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  106. #undef  INTERFACE
  107. #define INTERFACE   IHXASMSource
  108. DECLARE_INTERFACE_(IHXASMSource, IUnknown)
  109. {
  110.     /*
  111.      * IUnknown methods
  112.      */
  113.     STDMETHOD(QueryInterface) (THIS_
  114. REFIID riid,
  115. void** ppvObj) PURE;
  116.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  117.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  118.     /*
  119.      * IHXASMSource methods
  120.      */
  121.     /************************************************************************
  122.      * Method:
  123.      *     IHXASMSource::Subscribe
  124.      * Purpose:
  125.      *      Called to inform a file format that a subscription has occurred,
  126.      *     to rule number uRuleNumber, for stream uStreamNumber.
  127.      */
  128.     STDMETHOD(Subscribe) (THIS_
  129. UINT16 uStreamNumber,
  130. UINT16 uRuleNumber) PURE;
  131.     /************************************************************************
  132.      * Method:
  133.      *     IHXASMSource::Unsubscribe
  134.      * Purpose:
  135.      *      Called to inform a file format that a unsubscription has occurred,
  136.      *     to rule number uRuleNumber, for stream uStreamNumber.
  137.      */
  138.     STDMETHOD(Unsubscribe) (THIS_
  139. UINT16 uStreamNumber,
  140. UINT16 uRuleNumber) PURE;
  141. };
  142. /****************************************************************************
  143.  * 
  144.  *  Interface:
  145.  *
  146.  * IHXASMStream
  147.  *
  148.  *  Purpose:
  149.  * This interface is implemented by the client core.  Top level clients
  150.  * renderers, etc can query for this interface off of IHXStream.  This
  151.  * interface allows you to subscribe and unsubscribe to certain rules,
  152.  * and it also allows you to add a advise sink for these events. 
  153.  *
  154.  *  IID_IHXASMStream:
  155.  *
  156.  * {00001502-0901-11d1-8B06-00A024406D59}
  157.  *
  158.  */
  159. DEFINE_GUID(IID_IHXASMStream, 0x00001502, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  160.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  161. #undef  INTERFACE
  162. #define INTERFACE   IHXASMStream
  163. DECLARE_INTERFACE_(IHXASMStream, IUnknown)
  164. {
  165.     /*
  166.      * IUnknown methods
  167.      */
  168.     STDMETHOD(QueryInterface) (THIS_
  169. REFIID riid,
  170. void** ppvObj) PURE;
  171.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  172.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  173.     /*
  174.      * IHXASMStream methods
  175.      */
  176.     /************************************************************************
  177.      * Method:
  178.      *     IHXASMStream::AddASMStreamSink
  179.      * Purpose:
  180.      *     Add an advise sink for getting subscribe and unsubscribe
  181.      *     notifications.
  182.      */
  183.     STDMETHOD(AddStreamSink) (THIS_
  184. IHXASMStreamSink* pASMStreamSink) PURE;
  185.     /************************************************************************
  186.      * Method:
  187.      *     IHXASMStream::RemoveStreamSink
  188.      * Purpose:
  189.      *     Remove an advise sink for getting subscribe and unsubscribe
  190.      *     notifications.
  191.      */
  192.     STDMETHOD(RemoveStreamSink) (THIS_
  193. IHXASMStreamSink* pASMStreamSink) PURE;
  194.     /************************************************************************
  195.      * Method:
  196.      *     IHXASMStream::Subscribe
  197.      * Purpose:
  198.      *     Called by renderers and possibly even top level clients to
  199.      *     inform the core to subscribe to a particular rule number for
  200.      *     this stream.
  201.      */
  202.     STDMETHOD(Subscribe) (THIS_
  203. UINT16 uRuleNumber) PURE;
  204.     /************************************************************************
  205.      * Method:
  206.      *     IHXASMStream::Unsubscribe
  207.      * Purpose:
  208.      *     Called by renderers and possibly even top level clients to
  209.      *     inform the core to unsubscribe to a particular rule number for
  210.      *     this stream.
  211.      */
  212.     STDMETHOD (Unsubscribe) (THIS_
  213. UINT16 uRuleNumber) PURE;
  214. };
  215. /****************************************************************************
  216.  * 
  217.  *  Interface:
  218.  *
  219.  * IHXASMStream2
  220.  *
  221.  *  Purpose:
  222.  * This interface is implemented by the client core.  Top level clients
  223.  * renderers, etc can query for this interface off of IHXStream.  This
  224.  * interface allows you to disable and re-enable certain rules.
  225.  *
  226.  *  IID_IHXASMStream2:
  227.  *
  228.  * {00001504-0901-11d1-8b06-00a024406d59}
  229.  *
  230.  */
  231. DEFINE_GUID(IID_IHXASMStream2, 0x00001504, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
  232.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  233. #undef  INTERFACE
  234. #define INTERFACE   IHXASMStream2
  235. DECLARE_INTERFACE_(IHXASMStream2, IHXASMStream)
  236. {
  237.     /*
  238.      * IUnknown methods
  239.      */
  240.     STDMETHOD(QueryInterface) (THIS_
  241. REFIID riid,
  242. void** ppvObj) PURE;
  243.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  244.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  245.     /*
  246.      * IHXASMStream2 methods
  247.      */
  248.     /************************************************************************
  249.      * Method:
  250.      *     IHXASMStream2::Disable 
  251.      * Purpose:
  252.      *     Called by RA renderer to inform the core to disable a 
  253.      *     particular rule for this stream.
  254.      */
  255.     STDMETHOD(Disable) (THIS_
  256. UINT16 uRuleNumber) PURE;
  257.     /************************************************************************
  258.      * Method:
  259.      *     IHXASMStream2::Enable
  260.      * Purpose:
  261.      *     Called by RA renderer to inform the core to enable a 
  262.      *     particular rule for this stream.
  263.      */
  264.     STDMETHOD (Enable) (THIS_
  265. UINT16 uRuleNumber) PURE;
  266.     STDMETHOD (ReCompute) (THIS) PURE;
  267. };
  268. /****************************************************************************
  269.  * 
  270.  *  Interface:
  271.  *
  272.  * IHXASMStreamSink
  273.  *
  274.  *  Purpose:
  275.  * This is a advise sink for getting notification about subscriptions
  276.  * and unsubscriptions for a stream.
  277.  *
  278.  *  IID_IHXASMStream:
  279.  *
  280.  * {00001503-0901-11d1-8B06-00A024406D59}
  281.  *
  282.  */
  283. DEFINE_GUID(IID_IHXASMStreamSink, 0x00001503, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  284.  0xa0, 0x24, 0x40, 0x6d, 0x59);
  285. #undef  INTERFACE
  286. #define INTERFACE   IHXASMStreamSink
  287. DECLARE_INTERFACE_(IHXASMStreamSink, IUnknown)
  288. {
  289.     /*
  290.      * IUnknown methods
  291.      */
  292.     STDMETHOD(QueryInterface) (THIS_
  293. REFIID riid,
  294. void** ppvObj) PURE;
  295.     STDMETHOD_(ULONG32,AddRef) (THIS) PURE;
  296.     STDMETHOD_(ULONG32,Release) (THIS) PURE;
  297.     /*
  298.      * IHXASMStreamSink methods
  299.      */
  300.     /************************************************************************
  301.      * Method:
  302.      *     IHXASMStreamSink::OnSubscribe
  303.      * Purpose:
  304.      *     Called to inform you that a subscribe has occurred.
  305.      */
  306.     STDMETHOD (OnSubscribe) (THIS_
  307. UINT16 uRuleNumber) PURE;
  308.     /************************************************************************
  309.      * Method:
  310.      *     IHXASMStreamSink::OnUnsubscribe
  311.      * Purpose:
  312.      *     Called to inform you that a unsubscribe has occurred.
  313.      */
  314.     STDMETHOD (OnUnsubscribe) (THIS_
  315. UINT16 uRuleNumber) PURE;
  316. };
  317. #endif /*_HXASM_H_*/