engine/inc/ShowInfo.h
changeset 2 29cda98b007e
child 60 4d230e702aa3
equal deleted inserted replaced
1:5f8e5adbbed9 2:29cda98b007e
       
     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,
       
    45 	EVideoPodcast
       
    46 };
       
    47 
       
    48 class CShowInfo: public CBase {
       
    49 public:
       
    50 	IMPORT_C static CShowInfo* NewL(TUint aVersion=KShowInfoVersion);
       
    51 	IMPORT_C static CShowInfo* NewLC(TUint aVersion=KShowInfoVersion);
       
    52 	~CShowInfo();
       
    53 	IMPORT_C CShowInfo(CShowInfo *aInfo); // copy constructor
       
    54 
       
    55 public:
       
    56 	IMPORT_C const TDesC& Title() const;
       
    57 	IMPORT_C void SetTitleL(const TDesC& aTitle);
       
    58 
       
    59 	IMPORT_C const TDesC& Url() const;
       
    60 	IMPORT_C void SetUrlL(const TDesC &aUrl);
       
    61 	
       
    62 	IMPORT_C const TDesC& Description() const;
       
    63 	IMPORT_C void SetDescriptionL(const TDesC &aDescription);
       
    64 		
       
    65 	IMPORT_C TTimeIntervalMicroSeconds Position() const;
       
    66 	IMPORT_C void SetPosition(TTimeIntervalMicroSeconds aPosition);
       
    67 
       
    68 	IMPORT_C TUint PlayTime() const;
       
    69 	IMPORT_C void SetPlayTime(TUint aPlayTime);
       
    70 
       
    71 	IMPORT_C TPlayState PlayState() const;
       
    72 	IMPORT_C void SetPlayState(TPlayState aPlayState);
       
    73 
       
    74 	IMPORT_C TDownloadState DownloadState() const;
       
    75 	IMPORT_C void SetDownloadState(TDownloadState aDownloadState);
       
    76 
       
    77 	IMPORT_C TUint FeedUid() const;
       
    78 	IMPORT_C void SetFeedUid(TUint aFeedUid);
       
    79 
       
    80 	IMPORT_C void SetUid(TUint aUid);
       
    81 	IMPORT_C TUint Uid() const;
       
    82 	
       
    83 	IMPORT_C TUint ShowSize() const;
       
    84 	IMPORT_C void SetShowSize(TUint aShowSize);
       
    85 	
       
    86 	IMPORT_C const TTime PubDate() const;
       
    87 	IMPORT_C void SetPubDate(TTime aPubDate);
       
    88 	
       
    89 	IMPORT_C const TDesC &FileName() const;
       
    90 	IMPORT_C void SetFileNameL(const TDesC &aFileName);
       
    91 	
       
    92 	IMPORT_C void SetShowType(TShowType aShowType);
       
    93 	IMPORT_C TShowType ShowType() const;
       
    94 
       
    95 	IMPORT_C void SetTrackNo(TUint aTrackNo);
       
    96 	IMPORT_C TUint TrackNo() const;
       
    97 	
       
    98 	IMPORT_C void SetLastError(TInt aLastError);
       
    99 	IMPORT_C TInt LastError() const;
       
   100 private:
       
   101 	CShowInfo();
       
   102 	void ConstructL();
       
   103 
       
   104 private:
       
   105 	HBufC* iTitle;
       
   106 	HBufC* iUrl;
       
   107 	HBufC* iDescription;
       
   108 	HBufC* iFileName;
       
   109 	TTimeIntervalMicroSeconds iPosition;
       
   110 	TUint   iPlayTime;
       
   111 	TPlayState iPlayState;
       
   112 	TDownloadState iDownloadState;
       
   113 	TUint iFeedUid;
       
   114 	TUint iUid;
       
   115 	TUint iShowSize;
       
   116 	TUint iTrackNo;
       
   117 	TTime iPubDate;
       
   118 	TBool iDelete;
       
   119 	TShowType iShowType;
       
   120 	TInt  iLastError;
       
   121 };
       
   122 
       
   123 typedef RPointerArray<CShowInfo> RShowInfoArray;
       
   124 #endif