2
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB
|
|
3 |
*
|
|
4 |
* All rights reserved.
|
|
5 |
* This component and the accompanying materials are made available
|
|
6 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
7 |
* which accompanies this distribution, and is available
|
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
9 |
*
|
|
10 |
* Initial Contributors:
|
|
11 |
* EmbedDev AB - initial contribution.
|
|
12 |
*
|
|
13 |
* Contributors:
|
|
14 |
*
|
|
15 |
* Description:
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef _FEEDINFO_H_
|
|
20 |
#define _FEEDINFO_H_
|
|
21 |
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <s32strm.h>
|
|
24 |
|
|
25 |
#include "ImageHandler.h"
|
|
26 |
|
|
27 |
const TInt KFeedTitleLength=256;
|
|
28 |
const TInt KFeedUrlLength=1024;
|
|
29 |
const TInt KFeedDescriptionLength=2048;
|
|
30 |
class CFbsBitmap;
|
|
31 |
|
|
32 |
class CFeedInfo : public CBase, public MImageHandlerCallback
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
IMPORT_C static CFeedInfo* NewL();
|
|
36 |
IMPORT_C static CFeedInfo* NewLC();
|
|
37 |
~CFeedInfo();
|
|
38 |
IMPORT_C CFeedInfo* CopyL() const;
|
|
39 |
IMPORT_C const TDesC& Url() const;
|
|
40 |
IMPORT_C void SetUrlL(const TDesC &aUrl);
|
|
41 |
|
|
42 |
IMPORT_C const TDesC& Title() const;
|
|
43 |
IMPORT_C void SetTitleL(const TDesC &aTitle);
|
|
44 |
|
|
45 |
IMPORT_C const TDesC& Description() const;
|
|
46 |
IMPORT_C void SetDescriptionL(const TDesC &aDescription);
|
|
47 |
|
|
48 |
IMPORT_C const TDesC& ImageUrl() const;
|
|
49 |
IMPORT_C void SetImageUrlL(const TDesC &aImageUrl);
|
|
50 |
|
|
51 |
IMPORT_C const TDesC& Link() const;
|
|
52 |
IMPORT_C void SetLinkL(const TDesC &aLink);
|
|
53 |
|
|
54 |
IMPORT_C TTime BuildDate() const;
|
|
55 |
IMPORT_C void SetBuildDate(TTime aBuildDate);
|
|
56 |
|
|
57 |
IMPORT_C TTime LastUpdated() const;
|
|
58 |
IMPORT_C void SetLastUpdated(TTime aUpdated);
|
|
59 |
|
|
60 |
IMPORT_C TUint Uid() const;
|
|
61 |
|
|
62 |
IMPORT_C const TDesC& ImageFileName() const;
|
|
63 |
IMPORT_C void SetImageFileNameL(const TDesC &aFileName);
|
|
64 |
|
|
65 |
IMPORT_C void SetCustomTitle();
|
|
66 |
IMPORT_C TBool CustomTitle() const;
|
|
67 |
|
|
68 |
IMPORT_C void SetLastError(TInt aLastError);
|
|
69 |
IMPORT_C TInt LastError() const;
|
|
70 |
|
|
71 |
IMPORT_C CFbsBitmap* FeedIcon() const;
|
|
72 |
IMPORT_C void SetFeedIcon(CFbsBitmap* aBitmapToClone);
|
|
73 |
|
|
74 |
IMPORT_C TInt FeedIconIndex() const;
|
|
75 |
IMPORT_C void SetFeedIconIndex(TInt aIndex);
|
|
76 |
private:
|
|
77 |
CFeedInfo();
|
|
78 |
void ConstructL();
|
|
79 |
void ImageOperationCompleteL(TInt aError);
|
|
80 |
private:
|
|
81 |
HBufC* iUrl;
|
|
82 |
HBufC* iTitle;
|
|
83 |
HBufC* iDescription;
|
|
84 |
HBufC* iImageUrl;
|
|
85 |
HBufC* iImageFileName;
|
|
86 |
HBufC* iLink;
|
|
87 |
TTime iBuildDate;
|
|
88 |
TTime iLastUpdated;
|
|
89 |
TUint iUid;
|
|
90 |
TBool iCustomTitle;
|
|
91 |
TInt iLastError;
|
|
92 |
CFbsBitmap* iFeedIcon;
|
|
93 |
TInt iFeedIconIndex;
|
|
94 |
};
|
|
95 |
|
|
96 |
typedef RPointerArray<CFeedInfo> RFeedInfoArray;
|
|
97 |
|
|
98 |
#endif
|
|
99 |
|