⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hxcache.h

📁 著名的 helix realplayer 基于手机 symbian 系统的 播放器全套源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* ***** BEGIN LICENSE BLOCK ***** 
 * Version: RCSL 1.0/RPSL 1.0 
 *  
 * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
 *      
 * The contents of this file, and the files included with this file, are 
 * subject to the current version of the RealNetworks Public Source License 
 * Version 1.0 (the "RPSL") available at 
 * http://www.helixcommunity.org/content/rpsl unless you have licensed 
 * the file under the RealNetworks Community Source License Version 1.0 
 * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
 * in which case the RCSL will apply. You may also obtain the license terms 
 * directly from RealNetworks.  You may not use this file except in 
 * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
 * applicable to this file, the RCSL.  Please see the applicable RPSL or 
 * RCSL for the rights, obligations and limitations governing use of the 
 * contents of the file.  
 *  
 * This file is part of the Helix DNA Technology. RealNetworks is the 
 * developer of the Original Code and owns the copyrights in the portions 
 * it created. 
 *  
 * This file, and the files included with this file, is distributed and made 
 * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
 * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
 * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
 * 
 * Technology Compatibility Kit Test Suite(s) Location: 
 *    http://www.helixcommunity.org/content/tck 
 * 
 * Contributor(s): 
 *  
 * ***** END LICENSE BLOCK ***** */ 

#ifndef _HXCACHE_H_
#define _HXCACHE_H_

/*
 * Forward declarations of some interfaces defined herein.
 */
typedef _INTERFACE	IHXCache			IHXCache;
typedef _INTERFACE	IHXCacheFile			IHXCacheFile;
typedef _INTERFACE	IHXCacheFileResponse		IHXCacheFileResponse;
typedef _INTERFACE	IHXMIIFetch			IHXMIIFetch;
typedef _INTERFACE	IHXFIFOCache			IHXFIFOCache;
// $Private:
// cdist interfaces private for development, expect to make public when finalized.
typedef _INTERFACE	IHXContentDistribution		IHXContentDistribution;
typedef _INTERFACE	IHXContentDistributionResponse	IHXContentDistributionResponse;
typedef _INTERFACE	IHXContentDistributionAdvise	IHXContentDistributionAdvise;
typedef _INTERFACE	IHXContentDistributionAdviseResponse IHXContentDistributionAdviseResponse;
typedef _INTERFACE	IHXMIIPullEntire		IHXMIIPullEntire;
typedef _INTERFACE	IHXMIIPullEntireResponse	IHXMIIPullEntireResponse;
typedef _INTERFACE	IHXCacheFileSetVersion		IHXCacheFileSetVersion;
typedef _INTERFACE	IHXMIIReadStatCollection	IHXMIIReadStatCollection;
// $EndPrivate.
typedef _INTERFACE	IHXValues			IHXValues;
typedef _INTERFACE	IHXBuffer			IHXBuffer;
typedef _INTERFACE	IHXRequest			IHXRequest;


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXCache
 * 
 *  Purpose:
 * 
 *  IID_IHXCache:
 * 
 *	{00002E00-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXCache, 0x00002E00, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXCache

DECLARE_INTERFACE_(IHXCache, IUnknown)
{
    /*
     *	IUnknown methods
     */
    STDMETHOD(QueryInterface)	(THIS_
				REFIID riid,
				void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)	(THIS) PURE;

    STDMETHOD_(ULONG32,Release)	(THIS) PURE;

    /*
     *	IHXCache methods
     */

    /************************************************************************
     *	Method:
     *	    IHXCache::Init
     *	Purpose:
     */
    STDMETHOD(Init)	(THIS_ IHXValues* pOptions) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCache::CreateCacheFile
     *	Purpose:
     */
    STDMETHOD(CreateCacheFile)	(THIS_
				IHXCacheFile**    /*OUT*/	ppObject) PURE;

    /************************************************************************
     *  Method:
     *	    IHXCache:GetCacheInfo
     */
    STDMETHOD(GetCacheInfo) (THIS_
			    REF(const char*) /*OUT*/ pShortName) PURE;

};


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXCacheFile
 * 
 *  Purpose:
 * 
 *	Object that exports persistent cache storage API
 * 
 *  IID_IHXCacheFile:
 * 
 *	{00002E02-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXCacheFile, 0x00002E02, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXCacheFile

DECLARE_INTERFACE_(IHXCacheFile, IUnknown)
{
    /*
     *	IUnknown methods
     */
    STDMETHOD(QueryInterface)	(THIS_
				REFIID riid,
				void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)	(THIS) PURE;

    STDMETHOD_(ULONG32,Release)	(THIS) PURE;

    /*
     *	IHXCacheFile methods
     */

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::Init
     *	Purpose:
     *	    Associates a cache file object with the file response object
     *	    it should notify of operation completeness.
     */
    STDMETHOD(Init)	(THIS_
			IHXCacheFileResponse*   /*IN*/  pFileResponse) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::Open
     *	Purpose:
     *	    Opens the file for reading and writing.
     */
    STDMETHOD(Open)	(THIS_
			 const char* 		/*IN*/	pServerName,
			 const char*		/*IN*/	pFileName) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::Close
     *	Purpose:
     *	    Closes the file resource and releases all resources associated
     *	    with the object.
     */
    STDMETHOD(Close)	(THIS) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::AddBlock
     *	Purpose:
     *	    Adds a block of data to the cache
     */
    STDMETHOD(AddBlock)	(THIS_
			 UINT32			/*IN*/	ulBlockOffset,
			 IHXBuffer*		/*IN*/	pBlock) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::VerifyBlock
     *	Purpose:
     *	    Verify that a block of data is in the cache.
     */
    STDMETHOD(VerifyBlock)	(THIS_
				 UINT32		/*IN*/	ulBlockOffset,
				 UINT32		/*IN*/	ulBlockLength) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::ReadBlock
     *	Purpose:
     *	    Read a block out of the cache.
     */
    STDMETHOD(ReadBlock)	(THIS_
				 UINT32		/*IN*/	ulBlockOffset,
				 UINT32		/*IN*/	ulBlockLength) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::Stat
     *	Purpose:
     *	    Obtain size and timestamp information about a cached file.
     */
    STDMETHOD(Stat)	(THIS) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::SetStat
     *	Purpose:
     *	    Store size and timestamp information for a cached file.
     */
    STDMETHOD(SetStat)	(THIS_
			 UINT32		/*IN*/	ulSize,
			 UINT32		/*IN*/	ulCreationTime,
			 UINT32		/*IN*/	ulAccessTime,
			 UINT32		/*IN*/	ulModificationTime) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFile::Expire
     *	Purpose:
     *	    Marks a cached file as expired; all blocks stored for the
     *	    file should be discarded.
     */
    STDMETHOD(Expire)	(THIS) PURE;
};

/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXCacheFileResponse
 * 
 *  Purpose:
 * 
 *	Response interface for IHXCacheFile operations
 * 
 *  IID_IHXCacheFileResponse:
 * 
 *	{00002E03-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXCacheFileResponse, 0x00002E03, 0x901, 0x11d1, 0x8b, 0x6,
		0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXCacheFileResponse

DECLARE_INTERFACE_(IHXCacheFileResponse, IUnknown)
{
    /*
     *	IUnknown methods
     */
    STDMETHOD(QueryInterface)	(THIS_
				REFIID riid,
				void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)	(THIS) PURE;

    STDMETHOD_(ULONG32,Release)	(THIS) PURE;

    /*
     *	IHXCacheFileResponse methods
     */

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::InitDone
     *	Purpose:
     *	    Notification that IHXCacheFile::Init call has completed.
     */
    STDMETHOD(InitDone)		(THIS_
				 HX_RESULT	/*IN*/	status) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::OpenDone
     *	Purpose:
     *	    Notification that IHXCacheFile::Open operation has completed.
     */
    STDMETHOD(OpenDone)		(THIS_
				HX_RESULT	/*IN*/	status) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::CloseDone
     *	Purpose:
     *	    Notification that IHXCacheFile::Close operation has completed.
     */
    STDMETHOD(CloseDone)	(THIS_
				HX_RESULT	/*IN*/	status) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::AddBlockDone
     *	Purpose:
     *	    Notification that IHXCacheFile::AddBlock operation has completed.
     */
    STDMETHOD(AddBlockDone)	(THIS_
				HX_RESULT	/*IN*/	status) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::VerifyBlockDone
     *	Purpose:
     *	    Notification that IHXCacheFile::VerifyBlock operation has
     *	    completed.
     */
    STDMETHOD(VerifyBlockDone)	(THIS_
				BOOL		/*IN*/	bExist) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::ReadBlockDone
     *	Purpose:
     *	    Notification that IHXCacheFile::ReadBlock operation has
     *	    completed.
     */
    STDMETHOD(ReadBlockDone)	(THIS_
				HX_RESULT	/*IN*/	status,
				IHXBuffer*	/*IN*/	pBuffer) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::StatDone
     *	Purpose:
     *	    Return size and timestamp information about a cached file.
     */
    STDMETHOD(StatDone)		(THIS_
				 HX_RESULT	/*IN*/	status,
				 UINT32		/*IN*/ ulSize,
				 UINT32		/*IN*/ ulCreationTime,
				 UINT32		/*IN*/ ulAccessTime,
				 UINT32		/*IN*/ ulModificationTime) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::SetStatDone
     *	Purpose:
     *	    Store size and timestamp information for a cached file.
     *	    Notification that IHXCacheFile::SetStat operation has completed.
     */
    STDMETHOD(SetStatDone)	(THIS_
				 HX_RESULT	/*IN*/ status) PURE;

    /************************************************************************
     *	Method:
     *	    IHXCacheFileResponse::ExpireDone
     *	Purpose:
     *	    Notification that IHXCacheFile::Expire operation has completed.
     */
    STDMETHOD(ExpireDone)	(THIS_	
				 HX_RESULT	/*IN*/ status) PURE;

};

/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXMIIFetch
 * 
 *  Purpose:
 * 
 *	For IHXCacheFile implementations to be able to request data
 *	independantly of the mii.
 *
 *	You do not have to use this interface.  In fact, most people will not.
 *	This is only to be used if for some reason your IHXCacheFileObject
 *	Needs to request more data than it is already getting from mii.
 * 
 *  IID_IHXMIIFetch:
 * 
 *	{00002E04-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXMIIFetch, 0x00002E04, 0x901, 0x11d1, 0x8b, 0x6,
		0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXMIIFetch

DECLARE_INTERFACE_(IHXMIIFetch, IUnknown)
{
    /*
     *	IUnknown methods
     */
    STDMETHOD(QueryInterface)	(THIS_
				REFIID riid,
				void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)	(THIS) PURE;

    STDMETHOD_(ULONG32,Release)	(THIS) PURE;

    /*
     * IHXMIIFetch Methods.
     */
    STDMETHOD(RequestRemoteBlock)   (THIS_
				    UINT32 ulBlockOffset,
				    UINT32 ulBlockLen) PURE;

};


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXFIFOCache
 * 
 *  Purpose:
 *	To cache objects in a temporary storage for later retrieval
 *	Can be created off of IHXCommonClassFactory.
 *	Currently supported only on the client side.
 * 
 *  IID_IHXFIFOCache:
 * 
 *	{00002E05-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXFIFOCache, 0x00002E05, 0x901, 0x11d1, 0x8b, 0x6,
		0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);

#define CLSID_IHXFIFOCache IID_IHXFIFOCache

#undef  INTERFACE
#define INTERFACE   IHXFIFOCache

DECLARE_INTERFACE_(IHXFIFOCache, IUnknown)
{
    /*
     * IUnknown methods
     */
    STDMETHOD(QueryInterface)	(THIS_
				REFIID riid,
				void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)	(THIS) PURE;

    STDMETHOD_(ULONG32,Release)	(THIS) PURE;

    /*
     * IHXFIFOCache methods
     */

    /************************************************************************
     *	Method:
     *		IHXFIFOCache::Cache
     *	Purpose:
     *	    To cache objects in a temporary storage for later retrieval
     *
     *	    Currently supported objects:
     *		IHXBuffer
     *		IHXValues
     *		IHXPacket
// $Private:
     *		IHXTimeStampedBuffer
// $EndPrivate.
     *

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -