videocollection/hgmyvideos/inc/vcxhgmyvideosdownloadclient.h
changeset 0 96612d01cf9f
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:   CVcxHgMyVideosDownloadClient class definition*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VCXHGMYVIDEOSDOWNLOADCLIENT_H
       
    21 #define VCXHGMYVIDEOSDOWNLOADCLIENT_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include <coemain.h>
       
    25 #include "vcxhgmyvideoscollectionclient.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32  * 
       
    33  *
       
    34  * @lib vcxhgmyvideos.lib
       
    35  */
       
    36 NONSHARABLE_CLASS( CVcxHgMyVideosDownloadClient ) : public CBase
       
    37     {
       
    38     public:
       
    39         
       
    40         enum TVcxHgMyVideosDownloadCommand
       
    41             {
       
    42             EVcxHgMyVideosDownloadCommandNone   = 0,
       
    43             EVcxHgMyVideosDownloadCommandResume = 1,
       
    44             EVcxHgMyVideosDownloadCommandCancel = 2            
       
    45             };
       
    46         
       
    47     public: // Constructors and destructor
       
    48 
       
    49         /**
       
    50          * Two-phased constructor.
       
    51          *
       
    52          * @param aCollectionClient Reference to MPX Collection client.
       
    53          * @param aCollectionUtility Reference to MPX Collection Utility.
       
    54          * @return New object.
       
    55          */
       
    56         static CVcxHgMyVideosDownloadClient* NewL(
       
    57                    CVcxHgMyVideosCollectionClient& aCollectionClient,
       
    58                    MMPXCollectionUtility& aCollectionUtility);
       
    59 
       
    60         /**
       
    61          * Two-phased constructor.
       
    62          *
       
    63          * @param aCollectionClient Reference to MPX Collection client.
       
    64          * @param aCollectionUtility Reference to MPX Collection Utility.
       
    65          * @return New object.
       
    66          */
       
    67         static CVcxHgMyVideosDownloadClient* NewLC(
       
    68                    CVcxHgMyVideosCollectionClient& aCollectionClient,
       
    69                    MMPXCollectionUtility& aCollectionUtility);
       
    70 
       
    71         /**
       
    72          * Destructor.
       
    73          */
       
    74         virtual ~CVcxHgMyVideosDownloadClient();
       
    75 
       
    76     public:
       
    77         
       
    78         /**
       
    79          * Resumes a paused or failed video download.
       
    80          * 
       
    81          * @param aMpxMedia Reference to MPX media object to resume.
       
    82          */
       
    83         void ResumeDownloadL( const CMPXMedia& aMpxMedia );
       
    84         
       
    85         /**
       
    86          * Cancels an ongoing video download.
       
    87          * 
       
    88          * @param aMpxMedia Reference to MPX media object to cancel.
       
    89          */
       
    90         void CancelDownloadL( const CMPXMedia& aMpxMedia );
       
    91 
       
    92         /**
       
    93          * Returns true if object has pending command for MPX Collection Utility.
       
    94          * 
       
    95          * @return ETrue if command is pending.
       
    96          */
       
    97         TBool HasPendingCommand();
       
    98         
       
    99         /**
       
   100          * Handles completion of MPX Collection Utility command.
       
   101          * 
       
   102          * @param aError Error code about command completion.
       
   103          */
       
   104         void CommandCompleteL( TInt aError );
       
   105         
       
   106     protected: // Constructors
       
   107 
       
   108         /**
       
   109          * Default C++ constructor. 
       
   110          *
       
   111          * @param aCollectionClient Reference to MPX Collection client.
       
   112          * @param aCollectionUtility Reference to MPX Collection Utility.
       
   113          */
       
   114         CVcxHgMyVideosDownloadClient(
       
   115             CVcxHgMyVideosCollectionClient& aCollectionClient,
       
   116             MMPXCollectionUtility& aCollectionUtility);
       
   117 
       
   118         /**
       
   119          * Symbian 2nd phase constructor.
       
   120          */
       
   121         void ConstructL();
       
   122         
       
   123     protected:
       
   124 
       
   125 		/**
       
   126 		 * Reference to MPX Collection client.
       
   127 		 * Not own.
       
   128 		 */
       
   129 		CVcxHgMyVideosCollectionClient& iCollectionClient;
       
   130 
       
   131 		/**
       
   132 		 * Reference to MPX Collection Utility.
       
   133 		 * Not own.
       
   134 		 */
       
   135 		MMPXCollectionUtility& iCollectionUtility;
       
   136 		
       
   137 		/**
       
   138 		 * Variable for storing pending download command.
       
   139 		 */
       
   140 		TVcxHgMyVideosDownloadCommand iPendingCommand;
       
   141     };
       
   142 
       
   143 #endif // VCXHGMYVIDEOSDOWNLOADCLIENT_H