| author | Sebastian Brannstrom <sebastianb@symbian.org> | 
| Mon, 01 Nov 2010 22:59:47 +0000 | |
| branch | RCL_3 | 
| changeset 328 | 75a70f4a4f6d | 
| parent 107 | af6475fdf8d6 | 
| child 349 | 4538abb763e4 | 
| permissions | -rw-r--r-- | 
| 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 SHOWINFO_H_ | |
| 20 | #define SHOWINFO_H_ | |
| 21 | #include <e32base.h> | |
| 22 | #include <e32cmn.h> | |
| 23 | #include <e32std.h> | |
| 24 | #include <f32file.h> | |
| 25 | #include <s32strm.h> | |
| 26 | ||
| 27 | const int KShowInfoVersion = 8; | |
| 28 | ||
| 29 | enum TPlayState {
 | |
| 30 | ENeverPlayed, | |
| 31 | EPlayed, | |
| 32 | EPlaying | |
| 33 | }; | |
| 34 | ||
| 35 | enum TDownloadState {
 | |
| 36 | ENotDownloaded, | |
| 37 | EQueued, | |
| 38 | EDownloading, | |
| 39 | EFailedDownload, | |
| 40 | EDownloaded | |
| 41 | }; | |
| 42 | ||
| 43 | enum TShowType {
 | |
| 44 | EAudioPodcast = 0, | |
| 107 
af6475fdf8d6
Improved error handling; Implemented support for more than 2 flash drives also for import/export feeds
 teknolog parents: 
2diff
changeset | 45 | EVideoPodcast, | 
| 
af6475fdf8d6
Improved error handling; Implemented support for more than 2 flash drives also for import/export feeds
 teknolog parents: 
2diff
changeset | 46 | EOtherPodcast | 
| 2 | 47 | }; | 
| 48 | ||
| 49 | class CShowInfo: public CBase {
 | |
| 50 | public: | |
| 51 | IMPORT_C static CShowInfo* NewL(TUint aVersion=KShowInfoVersion); | |
| 52 | IMPORT_C static CShowInfo* NewLC(TUint aVersion=KShowInfoVersion); | |
| 53 | ~CShowInfo(); | |
| 54 | IMPORT_C CShowInfo(CShowInfo *aInfo); // copy constructor | |
| 55 | ||
| 56 | public: | |
| 57 | IMPORT_C const TDesC& Title() const; | |
| 58 | IMPORT_C void SetTitleL(const TDesC& aTitle); | |
| 59 | ||
| 60 | IMPORT_C const TDesC& Url() const; | |
| 61 | IMPORT_C void SetUrlL(const TDesC &aUrl); | |
| 62 | ||
| 63 | IMPORT_C const TDesC& Description() const; | |
| 64 | IMPORT_C void SetDescriptionL(const TDesC &aDescription); | |
| 65 | ||
| 66 | IMPORT_C TTimeIntervalMicroSeconds Position() const; | |
| 67 | IMPORT_C void SetPosition(TTimeIntervalMicroSeconds aPosition); | |
| 68 | ||
| 69 | IMPORT_C TUint PlayTime() const; | |
| 70 | IMPORT_C void SetPlayTime(TUint aPlayTime); | |
| 71 | ||
| 72 | IMPORT_C TPlayState PlayState() const; | |
| 73 | IMPORT_C void SetPlayState(TPlayState aPlayState); | |
| 74 | ||
| 75 | IMPORT_C TDownloadState DownloadState() const; | |
| 76 | IMPORT_C void SetDownloadState(TDownloadState aDownloadState); | |
| 77 | ||
| 78 | IMPORT_C TUint FeedUid() const; | |
| 79 | IMPORT_C void SetFeedUid(TUint aFeedUid); | |
| 80 | ||
| 81 | IMPORT_C void SetUid(TUint aUid); | |
| 82 | IMPORT_C TUint Uid() const; | |
| 83 | ||
| 84 | IMPORT_C TUint ShowSize() const; | |
| 85 | IMPORT_C void SetShowSize(TUint aShowSize); | |
| 86 | ||
| 87 | IMPORT_C const TTime PubDate() const; | |
| 88 | IMPORT_C void SetPubDate(TTime aPubDate); | |
| 89 | ||
| 90 | IMPORT_C const TDesC &FileName() const; | |
| 91 | IMPORT_C void SetFileNameL(const TDesC &aFileName); | |
| 92 | ||
| 93 | IMPORT_C void SetShowType(TShowType aShowType); | |
| 94 | IMPORT_C TShowType ShowType() const; | |
| 95 | ||
| 96 | IMPORT_C void SetTrackNo(TUint aTrackNo); | |
| 97 | IMPORT_C TUint TrackNo() const; | |
| 98 | ||
| 99 | IMPORT_C void SetLastError(TInt aLastError); | |
| 100 | IMPORT_C TInt LastError() const; | |
| 101 | private: | |
| 102 | CShowInfo(); | |
| 103 | void ConstructL(); | |
| 104 | ||
| 105 | private: | |
| 106 | HBufC* iTitle; | |
| 107 | HBufC* iUrl; | |
| 108 | HBufC* iDescription; | |
| 109 | HBufC* iFileName; | |
| 110 | TTimeIntervalMicroSeconds iPosition; | |
| 111 | TUint iPlayTime; | |
| 112 | TPlayState iPlayState; | |
| 113 | TDownloadState iDownloadState; | |
| 114 | TUint iFeedUid; | |
| 115 | TUint iUid; | |
| 116 | TUint iShowSize; | |
| 117 | TUint iTrackNo; | |
| 118 | TTime iPubDate; | |
| 119 | TBool iDelete; | |
| 120 | TShowType iShowType; | |
| 121 | TInt iLastError; | |
| 122 | }; | |
| 123 | ||
| 124 | typedef RPointerArray<CShowInfo> RShowInfoArray; | |
| 125 | #endif |