engine/inc/FeedParser.h
branch3rded
changeset 390 d7abecc9d189
parent 343 9c56bf585696
equal deleted inserted replaced
345:702ba9ffe210 390:d7abecc9d189
    60 enum TEncoding {
    60 enum TEncoding {
    61 	EUtf8,
    61 	EUtf8,
    62 	ELatin1
    62 	ELatin1
    63 };
    63 };
    64 
    64 
       
    65 enum TFeedDirection
       
    66 	{
       
    67 	EFeedUnknown,
       
    68 	EFeedAddsAtTop,
       
    69 	EFeedAddsAtBottom
       
    70 	};
       
    71 
    65 const int KBufferLength = 1024;
    72 const int KBufferLength = 1024;
    66 
    73 
    67 class CFeedParser : public CBase, public Xml::MContentHandler 
    74 class CFeedParser : public CBase, public Xml::MContentHandler 
    68 {
    75 {
    69 public:
    76 public:
    85 	void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
    92 	void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
    86 	void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, TInt aErrorCode);
    93 	void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, TInt aErrorCode);
    87 	void OnError(TInt aErrorCode);
    94 	void OnError(TInt aErrorCode);
    88 	TAny* GetExtendedInterface(const TInt32 aUid);
    95 	TAny* GetExtendedInterface(const TInt32 aUid);
    89 	CFeedInfo& ActiveFeed();
    96 	CFeedInfo& ActiveFeed();
       
    97 	
    90 private:
    98 private:
    91 	MFeedParserObserver& iCallbacks;
    99 	MFeedParserObserver& iCallbacks;
    92 	TFeedState iFeedState;
   100 	TFeedState iFeedState;
    93 
   101 
    94 	CShowInfo* iActiveShow;
   102 	CShowInfo* iActiveShow;
    95 	CFeedInfo *iActiveFeed;
   103 	CFeedInfo *iActiveFeed;
    96 
   104 	CShowInfo *iNewestShow;
       
   105 	
    97 	TBuf<KBufferLength> iBuffer;
   106 	TBuf<KBufferLength> iBuffer;
    98 	TUint iUid;
   107 	TUint iUid;
    99 	TUint iMaxItems;
   108 	TUint iMaxItems;
   100 	TUint iItemsParsed;
   109 	TUint iItemsParsed;
   101 	TBool iStoppedParsing;
   110 	TBool iStoppedParsing;
   102 	TEncoding iEncoding;
   111 	TEncoding iEncoding;
   103 	RFs& iRfs;
   112 	RFs& iRfs;
   104 	TInt iFileSize;
   113 	TInt iFileSize;
       
   114 	TFeedDirection iFeedDirection;
       
   115 	TTime iPreviousPubDate;
       
   116 	TBool iNewFeed;
   105 };
   117 };
   106 
   118 
   107 #endif
   119 #endif