webcorepagedata.h

来自「最新Nokia手机浏览器全套源代码完美版。」· C头文件 代码 · 共 93 行

H
93
字号

#ifndef _WEBCOREPAGEDATA_H_
#define _WEBCOREPAGEDATA_H_

#include <e32std.h>
#include <e32base.h>

//  INCLUDES


class CWebCorePageDataItem : public CBase
    {
    public:

        enum TPageDataItemType
            {
            EMarkup     = 0x01,
            EStylesheet = 0x02,
            EScript     = 0x04
            };

    public:    // Constructors and destructor

        /**
        * Two-phased constructor.
        * @return CWebCorePageDataItem *
        */
        static CWebCorePageDataItem* NewL( TPageDataItemType aItemType );

        /**
        * Destructor
        */
        virtual ~CWebCorePageDataItem();


    public:   // New functions
                
        TPageDataItemType Type() { return iItemType; }
        
        const TDesC8& Data() { return *iData; } 
                
        TDesC8& Url() { return *iUrl; } 

        TDesC8& ContentType() { return *iContentType; } 

        TInt ContentLength() { return iData->Length(); }

    TDesC8& Charset() { return *iCharset; }
    
        //void SetDataL( const TDesC8& aData);

        void SetDataL( const TDesC& aData);
                
        //void SetUrlL( const TDesC8& aUrl );

        void SetUrlL( const TDesC& aUrl );
        
        //void SetContentTypeL( const TDesC8& aContentType );

        void SetContentTypeL( const TDesC& aContentType );
        
    void SetCharsetL ( const TDesC& aCharset );
    
    private:      // Functions

        /**
        * By default Symbian 2nd phase constructor is private.
        */
        void ConstructL();

        /**
        * Default Constructor - inaccessible
        */
        CWebCorePageDataItem( TPageDataItemType aItemType );
        
    private:

        TPageDataItemType iItemType;

        HBufC8* iData;
        
        HBufC8* iUrl;
        
        HBufC8* iContentType;
        
        HBufC8* iCharset;
        
    };


#endif  //end of file    

⌨️ 快捷键说明

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