videocollection/hgmyvideos/inc/vcxhgmyvideosvideodata.h
changeset 0 96612d01cf9f
child 10 ce5ada96ab30
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   CVcxHgMyVideosVideoData class definition*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VCXHGMYVIDEOSVIDEODATA_H
       
    21 #define VCXHGMYVIDEOSVIDEODATA_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include <coemain.h>
       
    25 #include <mpxitemid.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32  *
       
    33  * @lib vcxhgmyvideos.lib
       
    34  */
       
    35 NONSHARABLE_CLASS( CVcxHgMyVideosVideoData ) :
       
    36         public CBase
       
    37     {
       
    38     public:
       
    39 
       
    40         enum TVideoDataState
       
    41             {
       
    42             EVideoDataStateNone = 0,
       
    43             EVideoDataStateThumbnailStarted,
       
    44             EVideoDataStateThumbnailFinished,
       
    45             EVideoDataStateDrmStarted,
       
    46             EVideoDataStateDrmFinished
       
    47             };
       
    48 
       
    49     public:
       
    50 
       
    51         /**
       
    52          * Two-phased constructor.
       
    53          * 
       
    54          * @return New object.
       
    55          */
       
    56         static CVcxHgMyVideosVideoData* NewL();
       
    57 
       
    58         /**
       
    59          * Two-phased constructor.
       
    60          * 
       
    61          * @return New object. 
       
    62          */
       
    63         static CVcxHgMyVideosVideoData* NewLC();
       
    64 
       
    65         /**
       
    66          * Destructor.
       
    67          */
       
    68         virtual ~CVcxHgMyVideosVideoData();
       
    69         
       
    70         /**
       
    71          * Returns MPX item id of video item.
       
    72          */
       
    73         TMPXItemId MPXItemId();
       
    74 
       
    75         /**
       
    76          * Returns data fetching state of video item.
       
    77          * 
       
    78          * @return State.
       
    79          */        
       
    80         TVideoDataState State();
       
    81 
       
    82         /**
       
    83          * Retuns thumbnail conversion Id of video item.
       
    84          * 
       
    85          * @return Thumbnail conversion Id.
       
    86          */        
       
    87         TInt ThumbnailConversionId();
       
    88 
       
    89         /**
       
    90          * Returns thumbnail bitmap of video item. Ownership transfer
       
    91          * depends on method parameter.
       
    92          * 
       
    93          * @param aGiveOwnership If ETrue, ownership is transferred.
       
    94          * @return Pointer to bitmap.
       
    95          */
       
    96         CFbsBitmap* Thumbnail( TBool aGiveOwnership = EFalse );
       
    97 
       
    98         /**
       
    99          * Return DRM protection status of video item.
       
   100          * 
       
   101          * @return DRM protection status.
       
   102          */
       
   103         TBool DrmProtected();
       
   104 
       
   105         /**
       
   106          * Return DRM key validity status for video item.
       
   107          * 
       
   108          * @return DRM key validity status for video item.
       
   109          */        
       
   110         TBool ValidDrmRights();        
       
   111         
       
   112         /**
       
   113          * Sets MPX item id.
       
   114          * 
       
   115          * @param aMPXItemId MPX item id.
       
   116          */
       
   117         void SetMPXItemId( TMPXItemId aMPXItemId ); 
       
   118 
       
   119         /**
       
   120          * Sets data fetching state of video item.
       
   121          * 
       
   122          * @param aState State.
       
   123          */
       
   124         void SetState( TVideoDataState aState );
       
   125         
       
   126         /**
       
   127          * Sets thumbnail conversion Id of video item.
       
   128          * 
       
   129          * @param aConversionId Thumbnail conversion Id.
       
   130          */        
       
   131         void SetThumbnailConversionId( TInt aConversionId );        
       
   132 
       
   133         /**
       
   134          * Sets thumbnail bitmap of video item. Ownership is transferred.
       
   135          * 
       
   136          * @param aThumbnail Pointer to bitmap.
       
   137          */
       
   138         void SetThumbnail( CFbsBitmap* aThumbnail );
       
   139         
       
   140         /**
       
   141          * Sets DRM protection status of video item.
       
   142          * 
       
   143          * @param aDrmProtected DRM protection status.
       
   144          */        
       
   145         void SetDrmProtected( TBool aDrmProtected );
       
   146         
       
   147         /**
       
   148          * Sets DRM key validity status for video item.
       
   149          * 
       
   150          * @param aDrmProtected DRM key validity status for video item.
       
   151          */        
       
   152         void SetValidDrmRights( TBool aValidDrmRights );        
       
   153         
       
   154     protected:
       
   155 
       
   156         /**
       
   157          * Default constructor
       
   158          *
       
   159          */
       
   160         CVcxHgMyVideosVideoData();
       
   161 
       
   162         /**
       
   163          * 2nd phase constructor.
       
   164          */
       
   165         void ConstructL();
       
   166 
       
   167     protected:
       
   168         
       
   169         /**
       
   170          * MPX item id.
       
   171          */
       
   172         TMPXItemId iMPXItemId;
       
   173 
       
   174         /**
       
   175          * Data fetching state of this item.
       
   176          */        
       
   177         TVideoDataState iState;
       
   178 
       
   179         /**
       
   180          * Thumbnail conversion ID for this item.
       
   181          */
       
   182         TInt iConversionId;
       
   183 
       
   184         /**
       
   185          * Thumbnail.
       
   186          * Own.
       
   187          */
       
   188         CFbsBitmap* iThumbnail;
       
   189         
       
   190         /**
       
   191          * DRM protection status.
       
   192          */
       
   193         TBool iDrmProtected;
       
   194         
       
   195         /**
       
   196          * DRM key validity status.
       
   197          */
       
   198         TBool iValidDrmRights;        
       
   199     };
       
   200 
       
   201 #endif // VCXHGMYVIDEOSVIDEODATA_H