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

📄 sm1parse.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 _SM1PARSE_H_
#define _SM1PARSE_H_

#include "chxpckts.h"
#include "smil1typ.h" /* renamed for SHAZAM; used to be smiltype.h */

// forward declarations
_INTERFACE   IHXSystemRequired;

typedef enum
{
    SMILUnknown = 0,
    SMILSmil,
    SMILMeta,
    SMILHead,
    SMILBody,
    SMILBasicLayout,
    SMILRootLayout,
    SMILRegion,
    SMILSwitch,
    SMILText,
    SMILImg,
    SMILRef,
    SMILAudio,
    SMILVideo,
    SMILAnimation,
    SMILTextstream,
    SMILAnchor,
    SMILAAnchor,
    SMILEndAAnchor,
    SMILPar,
    SMILEndPar,
    SMILSeq,
    SMILEndSeq,
    SMILRNRendererList,
    SMILRendererPreFetch
} SMIL1NodeTag;

typedef enum
{
    SMILEventSourceNone,
    SMILEventSourceBegin,
    SMILEventSourceEnd,
    SMILEventSourceFirst,
    SMILEventSourceLast,
    SMILEventSourceID,
    SMILEventSourceClock
} SMILEventSourceTag;

typedef enum
{
    SMILSyncAttrNone,
    SMILSyncAttrBegin,
    SMILSyncAttrEnd,
    SMILSyncAttrDur,
    SMILSyncAttrEndsync,
    SMILSyncAttrClipBegin,
    SMILSyncAttrClipEnd
} SMILSyncAttributeTag;

typedef enum
{
    SMILErrorNone,
    SMILErrorGeneralError,
    SMILErrorBadXML,
    SMILErrorNotSMIL,
    SMILErrorDuplicateID,
    SMILErrorNonexistentID,
    SMILErrorNoBodyTag,
    SMILErrorNoBodyElements,
    SMILErrorUnrecognizedTag,
    SMILErrorUnrecognizedAttribute,
    SMILErrorUnexpectedTag,
    SMILErrorBadDuration,
    SMILErrorBadAttribute,
    SMILErrorBadFragment,
    SMILErrorRequiredAttributeMissing,
    SMILErrorSyncAttributeMissing,
    SMILErrorUnexpectedContent,
    SMILErrorSMIL10Document,
    SMILErrorIndefiniteNotSupported,
    SMILErrorMetaDatatype,
    SMILErrorRootLayoutHeightWidthRequired,
    SMILErrorBadID,
    SMILErrorNoSources,
    SMILXMLUnknownError		    = HXR_XML_GENERALERROR,
    SMILXMLErrorNoClose		    = HXR_XML_NOCLOSE,
    SMILXMLErrorBadAttribute	    = HXR_XML_BADATTRIBUTE,
    SMILXMLErrorNoValue		    = HXR_XML_NOVALUE,
    SMILXMLErrorMissingQuote	    = HXR_XML_MISSINGQUOTE,
    SMILXMLErrorBadEndTag	    = HXR_XML_BADENDTAG,
    SMILXMLErrorNoTagType	    = HXR_XML_NOTAGTYPE,
    SMILXMLErrorIllegalID	    = HXR_XML_ILLEGALID
} SMILErrorTag;

class SMIL1NodeList;
class CSmil1Element;

class SMIL1Namespace
{
public:
    SMIL1Namespace(SMIL1Namespace* pNS)
    {
	m_name = new_string(pNS->m_name);
	m_pValue = pNS->m_pValue;
	m_pValue->AddRef();
    }

    SMIL1Namespace(const char* name, IHXBuffer* pVal)
    {
	m_name = new_string(name);
	m_pValue = pVal;
	m_pValue->AddRef();
    }
    ~SMIL1Namespace()
    {
	HX_VECTOR_DELETE(m_name);
	HX_RELEASE(m_pValue);
    }
    char* m_name;
    IHXBuffer* m_pValue;
};

class CSmil1Parser;

class SMIL1Node
{
public:
    SMIL1Node	();
    ~SMIL1Node	();
    SMIL1Node	(const SMIL1Node&, BOOL bKeepId=FALSE, CSmil1Parser* pParser=NULL);

    SMIL1Node*	getFirstChild();
    SMIL1Node*	getNextChild();

    CHXString		m_repeatid;
    CHXString		m_id;
    CHXString		m_name;
    UINT32		m_num;    
    SMIL1NodeTag		m_tag;
    SMIL1Node*		m_pParent;
    SMIL1Node*		m_pDependency;
    SMIL1NodeList*	m_pNodeList;
    IHXValues*		m_pValues;
    CSmil1Element*	m_pElement;
    UINT16		m_nGroup;
    BOOL 		m_bLastInGroup;
    BOOL		m_bDelete;
    BOOL		m_bSkipContent;
    BOOL		m_bRepeatHandled;
    RepeatTag		m_repeatTag;
    CHXString		m_trackHint;
    UINT32		m_ulTagStartLine;
    UINT32		m_ulTagStartColumn;

    CHXSimpleList*	m_pNamespaceList;
private:
    LISTPOSITION	m_curPosition;
};

class SMIL1NodeList: public CHXSimpleList
{
public:
    SMIL1NodeList	();
    ~SMIL1NodeList	();
    SMIL1NodeList* copy	(SMIL1Node* pParent, BOOL bKeepId=FALSE, CSmil1Parser* pParser = NULL);
    SMIL1Node* 	m_pParentNode;
};

//
// Parser class
//

class CSmil1Region;
class CSmil1RootLayout;
class CSmil1Source;
class CSmil1AAnchorElement;
class CSmil1AnchorElement;
class CSmil1SeqElement;
class CSmil1ParElement;
class CSmil1Meta;
class CSmil1RendererPreFetch;
class CSmil1MetaValues;
class CSmil1EndLayout;
class CSmil1ElementHandler;
class CSmil1Parser;
class XMLError;
class CSmil1TimelineElementManager;

class CSmil1ParserResponse: public IHXXMLParserResponse,
			   public ErrorNotifier
{
private:
    CSmil1Parser*		m_pParser;
    INT32			m_lRefCount;
    SMIL1Node*			m_pCurrentNode;

public:
    CSmil1ParserResponse		(CSmil1Parser* pParser);
    ~CSmil1ParserResponse	();

    STDMETHOD(QueryInterface)	(REFIID riid,
				void** ppvObj);

    STDMETHOD_(ULONG32,AddRef)	();

    STDMETHOD_(ULONG32,Release)	();

    STDMETHOD(HandleStartElement)	(const char*	/*IN*/	pName,
					IHXValues*	/*IN*/	pAttributes,
					UINT32		/*IN*/	ulLineNumber,
					UINT32		/*IN*/	ulColumNumber);

    STDMETHOD(HandleEndElement)		(const char*	/*IN*/	pName,
					UINT32		/*IN*/	ulLineNumber,
					UINT32		/*IN*/	ulColumNumber);

⌨️ 快捷键说明

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