videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistitem.h
changeset 0 96612d01cf9f
child 15 8f0df5c82986
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:   CVcxHgMyVideosVideoListItem class definition*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VCXHGMYVIDEOSVIDEOLISTITEM_H
       
    21 #define VCXHGMYVIDEOSVIDEOLISTITEM_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include <coemain.h>
       
    25 #include <mpxitemid.h>
       
    26 #include "vcxmyvideosdefs.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CMPXMedia;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *
       
    35  * @lib vcxhgmyvideos.lib
       
    36  */
       
    37 NONSHARABLE_CLASS( CVcxHgMyVideosVideoListItem ) : public CBase
       
    38     {
       
    39     public:
       
    40 
       
    41         /**
       
    42          * Two-phased constructor.
       
    43 		 *
       
    44          * @param aMPXMedia MPX Media object, ownership is transferred.
       
    45          * @return New object.
       
    46          */
       
    47         static CVcxHgMyVideosVideoListItem* NewL( CMPXMedia* aMPXMedia );
       
    48 
       
    49         /**
       
    50          * Two-phased constructor.
       
    51 		 *
       
    52          * @param aMPXMedia MPX Media object, ownership is transferred.
       
    53          * @return New object. 
       
    54          */
       
    55         static CVcxHgMyVideosVideoListItem* NewLC( CMPXMedia* aMPXMedia );
       
    56 
       
    57         /**
       
    58 		 * Compares aNewVideo and aVideoInArray objects by size.
       
    59 		 * 
       
    60 		 * @param aNewVideo Video to be added to the list. 
       
    61 		 * @param aVideoInArray Video in array which is currently compared against aNewVideo.
       
    62 		 * @return 1 if aNewVideo size is greater, -1 if smaller and 0 if equal.
       
    63 		 */
       
    64 		static TInt CompareBySize( const CVcxHgMyVideosVideoListItem& aNewVideo,
       
    65                                    const CVcxHgMyVideosVideoListItem& aVideoInArray );
       
    66         
       
    67 		/**
       
    68 		 * Compares aNewVideo and aVideoInArray objects by name.
       
    69 		 * 
       
    70 		 * @param aNewVideo Video to be added to the list. 
       
    71 		 * @param aVideoInArray Video in array which is currently compared against aNewVideo.
       
    72 		 * @return -1 if aVideoInArray has smaller value, 1 if greater and 0 if equal.
       
    73 		 */
       
    74 		static TInt CompareByName( const CVcxHgMyVideosVideoListItem& aNewVideo,
       
    75                                    const CVcxHgMyVideosVideoListItem& aVideoInArray );
       
    76         
       
    77         /**
       
    78 		 * Compares aNewVideo and aVideoInArray objects by date.
       
    79 		 * 
       
    80 		 * @param aNewVideo Video to be added to the list. 
       
    81 		 * @param aVideoInArray Video in array which is currently compared against aNewVideo.
       
    82 		 * @return -1 if aVideoInArray has smaller value, 1 if greater and 0 if equal.
       
    83 		 */
       
    84 		static TInt CompareByDate( const CVcxHgMyVideosVideoListItem& aNewVideo,
       
    85                                    const CVcxHgMyVideosVideoListItem& aVideoInArray );
       
    86 		
       
    87 	    /**
       
    88          * Returns MPX Media object.
       
    89 		 *
       
    90 		 * @return MPX Media object.
       
    91          */
       
    92 		CMPXMedia* Media();
       
    93 		        
       
    94         /**
       
    95          * Gets item's download state.
       
    96          * 
       
    97          * @return Item's download state as TVcxMyVideosDownloadState structure.
       
    98          */
       
    99         TVcxMyVideosDownloadState DownloadState();
       
   100                 
       
   101         /**
       
   102          * Destructor.
       
   103          */
       
   104         virtual ~CVcxHgMyVideosVideoListItem();                      
       
   105         
       
   106     private: // Constructors
       
   107 
       
   108         /**
       
   109          * Default constructor.
       
   110 		 *
       
   111 		 * @param aMPXMedia MPX Media object, ownership is transferred.
       
   112          */
       
   113         CVcxHgMyVideosVideoListItem( CMPXMedia* aMPXMedia );
       
   114 
       
   115         /**
       
   116          * 2nd phase constructor.
       
   117          */
       
   118         void ConstructL();       
       
   119     
       
   120     private: // Data
       
   121         
       
   122         /**
       
   123 		 * MPX media object.
       
   124          * Own.
       
   125 		 */
       
   126         CMPXMedia*                      iMedia;
       
   127     };
       
   128 
       
   129 #endif // VCXHGMYVIDEOSVIDEOLISTITEM_H