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

📄 hxfiles.h

📁 著名的 helix realplayer 基于手机 symbian 系统的 播放器全套源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/* ***** 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 _HXFILES_H_
#define _HXFILES_H_

/*
 * Forward declarations of some interfaces defined here-in.
 */
typedef _INTERFACE	IHXFileObject			IHXFileObject;
typedef _INTERFACE	IHXFileObjectExt		IHXFileObjectExt;
typedef _INTERFACE	IHXFileResponse		IHXFileResponse;
typedef _INTERFACE	IHXFileSystemObject		IHXFileSystemObject;
typedef _INTERFACE	IHXFileStat			IHXFileStat;
typedef _INTERFACE	IHXFileStatResponse		IHXFileStatResponse;

typedef _INTERFACE	IHXFileSystemManager		IHXFileSystemManager;
typedef _INTERFACE	IHXFileSystemManagerResponse	IHXFileSystemManagerResponse;
typedef _INTERFACE	IHXFileExists			IHXFileExists;
typedef _INTERFACE	IHXFileExistsResponse		IHXFileExistsResponse;
typedef _INTERFACE	IHXFileMimeMapper		IHXFileMimeMapper;
typedef _INTERFACE	IHXFileMimeMapperResponse	IHXFileMimeMapperResponse;
typedef _INTERFACE	IHXBroadcastMapper		IHXBroadcastMapper;
typedef _INTERFACE	IHXBroadcastMapperResponse	IHXBroadcastMapperResponse;
typedef _INTERFACE	IHXGetFileFromSamePoolResponse IHXGetFileFromSamePoolResponse;
typedef _INTERFACE	IHXBuffer			IHXBuffer;
typedef _INTERFACE	IHXPacket			IHXPacket;
typedef _INTERFACE	IHXValues			IHXValues;
typedef _INTERFACE	IHXMetaCreation		IHXMetaCreation;

typedef _INTERFACE	IHXAuthenticator               IHXAuthenticator;
typedef _INTERFACE	IHXRequest                     IHXRequest;
typedef _INTERFACE	IHXFileRename                  IHXFileRename;
typedef _INTERFACE	IHXFileMove			IHXFileMove;
typedef _INTERFACE	IHXDirHandler			IHXDirHandler;
typedef _INTERFACE	IHXDirHandlerResponse		IHXDirHandlerResponse;
typedef _INTERFACE	IHXFileRemove                  IHXFileRemove;
// $Private:
typedef _INTERFACE	IHXFastFileFactory             IHXFastFileFactory;
typedef _INTERFACE	IHXHTTPPostObject		IHXHTTPPostObject;
typedef _INTERFACE	IHXHTTPPostResponse		IHXHTTPPostResponse;
typedef _INTERFACE	IHXHTTPRedirect		IHXHTTPRedirect;
typedef _INTERFACE	IHXHTTPRedirectResponse	IHXHTTPRedirectResponse;
typedef _INTERFACE	IHXRM2Converter2               IHXRM2Converter2;
typedef _INTERFACE	IHXRM2Converter2Response       IHXRM2Converter2Response;
typedef _INTERFACE	IHXPoolPathAdjustment		IHXPoolPathAdjustment;
typedef _INTERFACE	IHXPostDataHandler		IHXPostDataHandler;
// $EndPrivate.


/****************************************************************************
 *  Defines:
 *	HX_FILE_XXXX
 *  Purpose:
 *	Flags for opening file objects
 */
#define HX_FILE_READ		1
#define HX_FILE_WRITE		2
#define HX_FILE_BINARY		4
#define HX_FILE_NOTRUNC		8
#define HX_FILE_NOPAC		16

/****************************************************************************
 *  Defines:
 *	HX_FILEADVISE_XXXX
 *  Purpose:
 *	Flags for file object Advise method
 */
#define HX_FILEADVISE_RANDOMACCESS		1
#define HX_FILEADVISE_SYNCACCESS		2
#define HX_FILEADVISE_ASYNCACCESS		3
#define HX_FILEADVISE_RANDOMACCESSONLY  4
#define HX_FILEADVISE_ANYACCESS         5

/****************************************************************************
 *  Defines:
 *	HX_FILERESPONSEADVISE_XXXX
 *  Purpose:
 *	Flags for file response Advise method
 */
#define HX_FILERESPONSEADVISE_REQUIREFULLREAD 1


#if defined(_UNIX) || defined(_WINDOWS)
#include "hlxclib/sys/stat.h"
/*
 * This is a subset of standard stat()/fstat() values that both Unix and
 * Windows support (or at least define).
 *
 * These flags are returned from IHXFileStatResponse::StatDone() in the
 * ulMode argument.
 */
#define HX_S_IFMT   S_IFMT
#define HX_S_IFDIR  S_IFDIR
#define HX_S_IFCHR  S_IFCHR
#define HX_S_IFIFO  S_IFIFO
#define HX_S_IFREG  S_IFREG
#else
/* Macintosh */
#define HX_S_IFMT   0170000
#define HX_S_IFDIR  0040000
#define HX_S_IFCHR  0020000
#define HX_S_IFIFO  0010000
#define HX_S_IFREG  0100000
#endif


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXFileObject
 * 
 *  Purpose:
 * 
 *	Object that exports file control API
 * 
 *  IID_IHXFileObject:
 * 
 *	{00000200-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXFileObject, 0x00000200, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXFileObject

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

    STDMETHOD_(ULONG32,AddRef)	(THIS) PURE;

    STDMETHOD_(ULONG32,Release)	(THIS) PURE;

    /*
     *	IHXFileObject methods
     */

    /************************************************************************
     *	Method:
     *	    IHXFileObject::Init
     *	Purpose:
     *	    Associates a file object with the file response object it should
     *	    notify of operation completness. This method should also check
     *	    for validity of the object (for example by opening it if it is
     *	    a local file).
     */
    STDMETHOD(Init)	(THIS_
			ULONG32		    /*IN*/  ulFlags,
			IHXFileResponse*   /*IN*/  pFileResponse) PURE;

    /************************************************************************
     *	Method:
     *	    IHXFileObject::GetFilename
     *	Purpose:
     *	    Returns the filename (without any path information) associated
     *	    with a file object.
     *
     *	    Note: The returned pointer's lifetime expires as soon as the
     *	    caller returns from a function which was called from the RMA
     *	    core (i.e. when you return control to the RMA core)
     *
     */
    STDMETHOD(GetFilename)	(THIS_
				REF(const char*)    /*OUT*/  pFilename) PURE;

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

    /************************************************************************
     *	Method:
     *	    IHXFileObject::Read
     *	Purpose:
     *	    Reads a buffer of data of the specified length from the file
     *	    and asynchronously returns it to the caller via the 
     *	    IHXFileResponse interface passed in to Init.
     */
    STDMETHOD(Read)	(THIS_
			ULONG32 ulCount) PURE;

    /************************************************************************
     *	Method:
     *	    IHXFileObject::Write
     *	Purpose:
     *	    Writes a buffer of data to the file and asynchronously notifies
     *	    the caller via the IHXFileResponse interface passed in to Init,
     *	    of the completeness of the operation.
     */
    STDMETHOD(Write)	(THIS_
			IHXBuffer* pBuffer) PURE;

    /************************************************************************
     *	Method:
     *	    IHXFileObject::Seek
     *	Purpose:
     *	    Seeks to an offset in the file and asynchronously notifies
     *	    the caller via the IHXFileResponse interface passed in to Init,
     *	    of the completeness of the operation.
     *	    If the bRelative flag is TRUE, it is a relative seek; else
     *	    an absolute seek.
     */
    STDMETHOD(Seek)	(THIS_
			ULONG32 ulOffset,
			BOOL	bRelative) PURE;    

    /************************************************************************
     *	Method:
     *	    IHXFileObject::Advise
     *	Purpose:
     *      To pass information to the File Object advising it about usage
     *	    heuristics.
     */
    STDMETHOD(Advise)	(THIS_
			ULONG32 ulInfo) PURE;
};


/****************************************************************************
 *
 *  Interface:
 *
 *  IHXFileObjectExt
 *
 *  Purpose:
 *
 *  Object that exports file control API
 *
 *  IID_IHXFileObjectExt:
 *
 *  {96DD5EB5-7EFD-4084-95CD-4D192A9036AF}
 *
 */
 DEFINE_GUID(IID_IHXFileObjectExt, 0x96dd5eb5, 0x7efd, 0x4084, 0x95, 0xcd, 0x4d,
                       0x19, 0x2a, 0x90, 0x36, 0xaf);

#undef  INTERFACE
#define INTERFACE   IHXFileObjectExt

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

    STDMETHOD_(ULONG32,AddRef)  (THIS) PURE;

    STDMETHOD_(ULONG32,Release) (THIS) PURE;

    /************************************************************************
     * Method:
     *     IHXFileObjectExt::GetFullFilename
     * Purpose:
     *     Returns the filename, with path information, associated
     *     with a file object.
     *
     *     Note: The returned pointer's lifetime expires as soon as the
     *     caller returns from a function which was called from the RMA
     *     core (i.e. when you return control to the RMA core)
     *
     */
    STDMETHOD(GetFullFilename) (THIS_
                               REF(IHXBuffer*)  /*OUT*/  pFullFilename) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXFileResponse
 * 
 *  Purpose:
 * 
 *	Object that exports file response API
 * 
 *  IID_IHXFileResponse:
 * 
 *	{00000201-0901-11d1-8B06-00A024406D59}
 * 
 */
DEFINE_GUID(IID_IHXFileResponse, 0x00000201, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE   IHXFileResponse

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

    STDMETHOD_(ULONG32,AddRef)		(THIS) PURE;

    STDMETHOD_(ULONG32,Release)		(THIS) PURE;

    /*
     *	IHXFileResponse methods
     */

    /************************************************************************
     *	Method:
     *	    IHXFileResponse::InitDone
     *	Purpose:
     *	    Notification interface provided by users of the IHXFileObject
     *	    interface. This method is called by the IHXFileObject when the
     *	    initialization of the file is complete. If the file is not valid 
     *	    for the file system, the status HXR_FAILED should be 
     *	    returned.
     */
    STDMETHOD(InitDone)			(THIS_
					HX_RESULT	    status) PURE;

    /************************************************************************
     *	Method:
     *	    IHXFileResponse::CloseDone
     *	Purpose:
     *	    Notification interface provided by users of the IHXFileObject
     *	    interface. This method is called by the IHXFileObject when the
     *	    close of the file is complete.
     */
    STDMETHOD(CloseDone)		(THIS_
					HX_RESULT	    status) PURE;

    /************************************************************************
     *	Method:
     *	    IHXFileResponse::ReadDone
     *	Purpose:
     *	    Notification interface provided by users of the IHXFileObject
     *	    interface. This method is called by the IHXFileObject when the
     *	    last read from the file is complete and a buffer is available.
     */
    STDMETHOD(ReadDone)			(THIS_ 
					HX_RESULT	    status,
					IHXBuffer*	    pBuffer) PURE;

    /************************************************************************
     *	Method:
     *	    IHXFileResponse::WriteDone
     *	Purpose:
     *	    Notification interface provided by users of the IHXFileObject
     *	    interface. This method is called by the IHXFileObject when the
     *	    last write to the file is complete.
     */
    STDMETHOD(WriteDone)		(THIS_ 
					HX_RESULT	    status) PURE;

    /************************************************************************
     *	Method:
     *	    IHXFileResponse::SeekDone
     *	Purpose:
     *	    Notification interface provided by users of the IHXFileObject
     *	    interface. This method is called by the IHXFileObject when the
     *	    last seek in the file is complete.
     */
    STDMETHOD(SeekDone)			(THIS_ 
					HX_RESULT	    status) PURE;
};

/****************************************************************************
 * 
 *  Interface:
 * 
 *      IHXAdvise
 * 
 *  Purpose:
 * 
 *      Allow IHXFileObject to query its IHXFileResponse interface
 * 
 *  IID_IHXAdvise:
 * 
 *      {43C3A3B8-8F76-4394-A4F8-07AA9091A0CA}
 * 
 */
DEFINE_GUID(IID_IHXAdvise, 0x43c3a3b8, 0x8f76, 0x4394, 0xa4, 0xf8, 0x7, 
                        0xaa, 0x90, 0x91, 0xa0, 0xca);

#undef  INTERFACE
#define INTERFACE   IHXAdvise

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

    STDMETHOD_(ULONG32,AddRef)          (THIS) PURE;

    STDMETHOD_(ULONG32,Release)         (THIS) PURE;

    /*
     *  IHXAdvise methods
     */

    /************************************************************************
     *  Method:
     *      IHXAdvise::Advise
     *  Purpose:
     *      Allows IHXFileObject to query its IHXFileResponse about
     *      usage heuristics. It should pass HX_FILERESPONSEADVISE_xxx
     *      flags into this method.
     */
    STDMETHOD(Advise)   (THIS_ ULONG32 ulInfo) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *	IHXFileSystemObject
 * 
 *  Purpose:
 * 
 *	Object that allows a Controller to communicate with a specific
 *	File System plug-in session
 * 
 *  IID_IHXFileSystemObject:
 * 
 *	{00000202-0901-11d1-8B06-00A024406D59}
 * 

⌨️ 快捷键说明

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