hxplay.h

来自「symbian 下的helix player源代码」· C头文件 代码 · 共 1,756 行 · 第 1/4 页

H
1,756
字号
/* ***** BEGIN LICENSE BLOCK *****
 * Source last modified: $Id: hxplay.h,v 1.18.8.1 2004/07/09 02:05:40 hubbe Exp $
 * 
 * Portions Copyright (c) 1995-2004 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 (the "RPSL") available at
 * http://www.helixcommunity.org/content/rpsl unless you have licensed
 * the file under the current version of the RealNetworks Community
 * Source License (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.
 * 
 * Alternatively, the contents of this file may be used under the
 * terms of the GNU General Public License Version 2 or later (the
 * "GPL") in which case the provisions of the GPL are applicable
 * instead of those above. If you wish to allow use of your version of
 * this file only under the terms of the GPL, and not to allow others
 * to use your version of this file under the terms of either the RPSL
 * or RCSL, indicate your decision by deleting the provisions above
 * and replace them with the notice and other provisions required by
 * the GPL. If you do not delete the provisions above, a recipient may
 * use your version of this file under the terms of any one of the
 * RPSL, the RCSL or the GPL.
 * 
 * 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 _HXPLAYER_
#define _HXPLAYER_

#include "hxtypes.h"
#include "hxcomm.h"		// IHXRegistryID
#include "hxfiles.h"
#include "hxsmbw.h"
#include "hxresult.h"
#include "hxslist.h"
#include "chxelst.h"
#include "hxmap.h"
#include "chxpckts.h"
#include "hxurl.h"
#include "hxtick.h"
#include "hxmon.h"
#include "hxclreg.h"
#include "statinfo.h"
#include "strminfo.h"
#include "hxauth.h"
#include "hxpreftr.h"
#include "hxvsrc.h"

//#include "prefkeys.h"
#include "plprefk.h"
//#include "domain.h" 		// Needed for domain object

#include "timeval.h"
#include "hxausvc.h"
#include "hxpends.h"
#include "hxerror.h"
#include "hxmeta.h"
#include "chxphook.h"
#include "hxwin.h"
#include "hxcorgui.h"
#include "smartptr.h"
#include "miscsp.h"
#include "hxrquest.h"
#include "perscmgr.h"
#include "hxbsrc.h"
#include "hxsrc.h"
#include "hxcbobj.h"

#ifdef _SYMBIAN
//XXXgfw Wow, symbian's unistd.h #defines remove to be unlink.
//Very uncool.
#undef remove
#endif

// forward decl.
_INTERFACE IHXPlayer;
_INTERFACE IHXPlayer2;
_INTERFACE IHXAudioPlayerResponse;
_INTERFACE IHXClientEngine;
_INTERFACE IHXRenderer;
_INTERFACE IHXScheduler;
_INTERFACE IHXClientAdviseSink;
_INTERFACE IHXMetaTrack;
_INTERFACE IHXMetaLayout;
_INTERFACE IHXErrorMessages;
_INTERFACE IHXPreferences;
_INTERFACE IHXHyperNavigate;
_INTERFACE IHXAuthenticationManager;
_INTERFACE IHXSiteSupplier;
_INTERFACE IHXSiteLayout;
_INTERFACE IHXUpgradeCollection;
_INTERFACE IHXGroupSink;
_INTERFACE IHXGroup;
_INTERFACE IHXPlayerState;
_INTERFACE IHXProxyManager;
_INTERFACE IHXViewSourceCommand;
_INTERFACE IHXViewPortManager;
#if defined(HELIX_FEATURE_MEDIAMARKER)
_INTERFACE IHXMediaMarkerManager;
#endif /* #if defined(HELIX_FEATURE_MEDIAMARKER) */
#if defined(HELIX_FEATURE_EVENTMANAGER)
_INTERFACE IHXEventManager;
#endif /* #if defined(HELIX_FEATURE_EVENTMANAGER) */
_INTERFACE IHXPlayerNavigator;
_INTERFACE IHXClientRequestSink;

class CHXSiteManager;

class CHXAudioPlayer;
class HXClientEngine;
class HXSource;
class HXFileSource;
class HXNetSource;
class HXStream;

class HXPlayerCallback;
class UpdateStatsCallback;
class CHXAdviseSinkControl;
class CHXErrorSinkControl;
class HXCookies;

class Timeline;
class Timeval;
class HXMutex;

class Plugin2Handler;
struct IHXPlugin2Handler;


class HXPersistentComponentManager;
class HXPreferredTransportManager;

#ifdef _UNIX
_INTERFACE IHXSiteEventHandler;
#endif

struct STREAM_INFO;

typedef ULONG32	BufferingReason;

struct RendererInfo;
class  SourceInfo;
class HXPlayer;
class UpdateStatsCallback;
class HXPlayerCallback;
class HXBasicGroupManager;
class HXAdvancedGroupManager;
class NextGroupManager;
class PrefetchManager;
class HXMasterTAC;
class PlayerHyperNavigate;

struct IHXBandwidthManager;

class CHXEvent;
class CHXSimpleList;
class CHXMapStringToOb;
class HXViewPortManager;
#if defined(HELIX_FEATURE_MEDIAMARKER)
class CHXMediaMarkerManager;
#endif /* #if defined(HELIX_FEATURE_MEDIAMARKER) */
#if defined(HELIX_FEATURE_EVENTMANAGER)
class CRendererEventManager;
#endif /* #if defined(HELIX_FEATURE_EVENTMANAGER) */

#define DEFAULT_TIMESYNC_GRANULARITY	100
/* Lowest allowable time sync granularity */
#define MINIMUM_TIMESYNC_GRANULARITY	20

#ifndef _WIN16
//#if defined(HELIX_FEATURE_AUTHENTICATION)
typedef WRAPPED_POINTER(IUnknown) Wrapped_IUnknown;

class _CListOfWrapped_IUnknown_Node
{
#ifdef HELIX_FEATURE_AUTHENTICATION
public:
    _CListOfWrapped_IUnknown_Node();
    ~_CListOfWrapped_IUnknown_Node();

    Wrapped_IUnknown& value();
    const Wrapped_IUnknown& value() const;
    void value(const Wrapped_IUnknown& rclsNewValue);
    _CListOfWrapped_IUnknown_Node& operator=(const Wrapped_IUnknown& rclsNewValue); 
    _CListOfWrapped_IUnknown_Node* next() const;
    void next(_CListOfWrapped_IUnknown_Node* plocnNew);
    _CListOfWrapped_IUnknown_Node* prev() const;
    void prev(_CListOfWrapped_IUnknown_Node* plocnNew);
    void Remove();
    void Insert(_CListOfWrapped_IUnknown_Node& rlocnNew);
						
protected:
    Wrapped_IUnknown m_clsValue;
    _CListOfWrapped_IUnknown_Node* m_plocPrev;
    _CListOfWrapped_IUnknown_Node* m_plocNext;
    _CListOfWrapped_IUnknown_Node(const _CListOfWrapped_IUnknown_Node& rlocnOther){}
#endif /* HELIX_FEATURE_AUTHENTICATION */
};

class _CListIteratorWrapped_IUnknown_;
class _CListReverseIteratorWrapped_IUnknown_;

class _CListOfWrapped_IUnknown_
{
public:
    typedef _CListIteratorWrapped_IUnknown_ iterator;
    typedef _CListReverseIteratorWrapped_IUnknown_ reverse_iterator;
    typedef const _CListReverseIteratorWrapped_IUnknown_ const_reverse_iterator;

#ifdef HELIX_FEATURE_AUTHENTICATION
    _CListOfWrapped_IUnknown_();
    _CListOfWrapped_IUnknown_(const _CListOfWrapped_IUnknown_& rlocOther);
    ~_CListOfWrapped_IUnknown_();
    _CListOfWrapped_IUnknown_& operator=(const _CListOfWrapped_IUnknown_& rlocOther); 

    iterator begin();
    const iterator begin() const;
    iterator end();
    const iterator end() const;

    reverse_iterator rbegin();
    const reverse_iterator rbegin() const;
    reverse_iterator rend();
    const reverse_iterator rend() const;

    iterator insert(iterator itBefore, const Wrapped_IUnknown&);
    void insert
    (
	iterator itBefore,
	const iterator itFirst,
	const iterator itLast
    );
    void remove(iterator itThis);
    void remove(iterator itFirst, iterator itLast);

    void empty();

protected:
    _CListOfWrapped_IUnknown_Node m_locnREnd;
    _CListOfWrapped_IUnknown_Node m_locnEnd;

    void _copy(const _CListOfWrapped_IUnknown_& rlocOther);
#endif /* HELIX_FEATURE_AUTHENTICATION */
};

class _CListIteratorWrapped_IUnknown_
{
#ifdef HELIX_FEATURE_AUTHENTICATION
public:
    _CListIteratorWrapped_IUnknown_();
    _CListIteratorWrapped_IUnknown_
    (
        const _CListOfWrapped_IUnknown_Node& rlocnNewLocation
    );
    _CListIteratorWrapped_IUnknown_(const _CListIteratorWrapped_IUnknown_& rliocOther);
    ~_CListIteratorWrapped_IUnknown_();

    _CListIteratorWrapped_IUnknown_& operator=
    (
	const _CListIteratorWrapped_IUnknown_& rliocOther
    );

    Wrapped_IUnknown& operator*();
    _CListIteratorWrapped_IUnknown_& operator=(const Wrapped_IUnknown& rclsNewValue);

    _CListIteratorWrapped_IUnknown_& operator++();
    const _CListIteratorWrapped_IUnknown_ operator++(int);

    _CListIteratorWrapped_IUnknown_& operator--();
    const _CListIteratorWrapped_IUnknown_ operator--(int);

private:
    _CListOfWrapped_IUnknown_Node* m_plocCurrent;

    friend class _CListOfWrapped_IUnknown_;
    friend BOOL operator==
    (
	const _CListIteratorWrapped_IUnknown_& rliocLeft,
	const _CListIteratorWrapped_IUnknown_& rliocRight
    );
    friend BOOL operator!=
    (
	const _CListIteratorWrapped_IUnknown_& rliocLeft,
	const _CListIteratorWrapped_IUnknown_& rliocRight
    );
#endif /* HELIX_FEATURE_AUTHENTICATION */
};

#ifdef HELIX_FEATURE_AUTHENTICATION
BOOL operator==
(
    const _CListIteratorWrapped_IUnknown_& rliocLeft,
    const _CListIteratorWrapped_IUnknown_& rliocRight
);

BOOL operator!=
(
    const _CListIteratorWrapped_IUnknown_& rliocLeft,
    const _CListIteratorWrapped_IUnknown_& rliocRight
);
#endif /* HELIX_FEATURE_AUTHENTICATION */

class _CListReverseIteratorWrapped_IUnknown_
{
#ifdef HELIX_FEATURE_AUTHENTICATION
public:
    _CListReverseIteratorWrapped_IUnknown_();
    _CListReverseIteratorWrapped_IUnknown_
    (
        const _CListOfWrapped_IUnknown_Node& rlocnNewLocation
    );
    _CListReverseIteratorWrapped_IUnknown_
    (
	const _CListReverseIteratorWrapped_IUnknown_& rlriocOther
    );
    ~_CListReverseIteratorWrapped_IUnknown_();

    _CListReverseIteratorWrapped_IUnknown_& operator=
    (
	const _CListReverseIteratorWrapped_IUnknown_& rlriocOther
    );

    Wrapped_IUnknown& operator*();
    _CListReverseIteratorWrapped_IUnknown_& operator=(const Wrapped_IUnknown& rclsNewValue);

    _CListReverseIteratorWrapped_IUnknown_& operator++();
    const _CListReverseIteratorWrapped_IUnknown_ operator++(int);
    _CListReverseIteratorWrapped_IUnknown_& operator--();
    const _CListReverseIteratorWrapped_IUnknown_ operator--(int);

private:
    _CListOfWrapped_IUnknown_Node* m_plocCurrent;
    friend class _CListOfWrapped_IUnknown_;
    friend BOOL operator==
    (
	const _CListReverseIteratorWrapped_IUnknown_& rlriocLeft,
	const _CListReverseIteratorWrapped_IUnknown_& rlriocRight
    );
    friend BOOL operator!=
    (
	const _CListReverseIteratorWrapped_IUnknown_& rlriocLeft,
	const _CListReverseIteratorWrapped_IUnknown_& rlriocRight
    );
#endif /* HELIX_FEATURE_AUTHENTICATION */
};

#ifdef HELIX_FEATURE_AUTHENTICATION
BOOL operator==
(
    const _CListReverseIteratorWrapped_IUnknown_& rlriocLeft,
    const _CListReverseIteratorWrapped_IUnknown_& rlriocRight
);
BOOL operator!=
(
    const _CListReverseIteratorWrapped_IUnknown_& rlriocLeft,
    const _CListReverseIteratorWrapped_IUnknown_& rlriocRight
);								    
#endif /* HELIX_FEATURE_AUTHENTICATION */

class _CHXAuthenticationRequests
{
public:
    _CHXAuthenticationRequests();
    ~_CHXAuthenticationRequests();

    HX_RESULT Add
    (
	HXPlayer* pPlayerRequester, 
	IHXAuthenticationManagerResponse* pAuthenticationManagerResponseRequester,
	IHXValues* pAuthenticationHeaderValues
    );
    HX_RESULT SatisfyPending
    (
	HX_RESULT ResultStatus, 
	const char* pCharUser, 
	const char* pCharPassword
    );
    void     ClearPendingList();
private:
    _CListOfWrapped_IUnknown_ m_ListOfIUnknownRequesters;
    HXMutex* m_pMutexProtectList;
    BOOL m_bUIShowing;
};
//#endif /* HELIX_FEATURE_AUTHENTICATION */

struct RedirectInfo
{
    RedirectInfo()
    {
	m_nGroupID = 0;
	m_nTrackID = 0;
	m_pURL = NULL;
    }

    ~RedirectInfo()
    {
	HX_VECTOR_DELETE(m_pURL);
    }

    UINT16  m_nGroupID;
    UINT16  m_nTrackID;
    char*   m_pURL;
};

struct PendingTrackInfo
{
    PendingTrackInfo(UINT16	    uGroupIndex, 
		     UINT16	    uTrackIndex,
		     IHXValues*    pTrack)
    {
	m_uGroupIndex	= uGroupIndex;
	m_uTrackIndex	= uTrackIndex;
	m_pTrack	= pTrack;
	m_pTrack->AddRef();
    }

⌨️ 快捷键说明

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