videofeeds/server/tsrc/VCXScheduledDownloadTest/inc/VCXScheduledDownloadTester.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2009 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVCXSCHEDULEDDOWNLOADTESTER_H_
       
    20 #define CVCXSCHEDULEDDOWNLOADTESTER_H_
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "VCXTestMyVideosObserver.h"
       
    25 #include "VCXTestStifScriptBaseExt.h"
       
    26 #include "VCXTestMessageWait.h"
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CVCXTestMyVideosCollectionClient;
       
    34 class CCseSchedulerApi;
       
    35 
       
    36 // DATA TYPES
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  CVCXScheduledDownloadTester 
       
    42 *
       
    43 *  @lib ?library
       
    44 *  @since ?Series60_version
       
    45 */
       
    46 class CVCXScheduledDownloadTester : public CBase, 
       
    47                                     public MVCXTestMyVideosObserver, 
       
    48                                     public MVCXTestMessageWaitObserver
       
    49     {
       
    50         
       
    51     public:  // Constructors and destructor
       
    52          
       
    53          /**
       
    54          * Two-phased constructor.
       
    55          */
       
    56          static CVCXScheduledDownloadTester* NewL( CVCXTestStifScriptBaseExt* aStifScriptBase );
       
    57     
       
    58          /**
       
    59          * Destructor.
       
    60          */
       
    61          virtual ~CVCXScheduledDownloadTester();     
       
    62     
       
    63     private:
       
    64         
       
    65         /**
       
    66         * C++ default constructor.
       
    67         */
       
    68         CVCXScheduledDownloadTester( CVCXTestStifScriptBaseExt* aStifScriptBase );
       
    69     
       
    70         /**
       
    71         * By default Symbian 2nd phase constructor is private.
       
    72         */
       
    73         void ConstructL( );
       
    74         
       
    75     private: // Functions from base classes.
       
    76         
       
    77         /**
       
    78          *  
       
    79          */
       
    80         void VideoEventL( TVCXTestVideoEvent aEvent, TUint32 aParam1, TUint32 aParam2, TInt aError );
       
    81     
       
    82         void MessageWaitComplete( TInt aError );
       
    83         
       
    84     public: // New functions
       
    85     
       
    86         void RefreshL();
       
    87         
       
    88         void RemoveAllMediasL();
       
    89         
       
    90         void RemoveVideoL( TUint aIndex );
       
    91         
       
    92         void DownloadL( const TDesC& aUrl, TUint aIapId, const TDesC& aUserName, const TDesC& aPassword );
       
    93         
       
    94         void CancelDownloadL( TUint aIndex );
       
    95         
       
    96         void WaitForVideoEventsL( TInt aTimeoutSeconds, RArray<TInt32> aEvents );
       
    97         
       
    98         void CoolDown();
       
    99         
       
   100         TInt VideoCount();
       
   101         
       
   102         TInt DownloadCount();
       
   103         
       
   104         void RemoveAllSchedulesL();
       
   105         
       
   106         TInt GetLastError();
       
   107         
       
   108     private: // Data
       
   109 
       
   110         CVCXTestMyVideosCollectionClient* iMyVideosCollectionClient;
       
   111         
       
   112         CVCXTestStifScriptBaseExt* iStifScriptBase;
       
   113         
       
   114         CVCXTestMessageWait* iMessageWait;
       
   115         
       
   116         CCseSchedulerApi*   iSchedulerClient;
       
   117         
       
   118         TInt iError;
       
   119     };
       
   120 
       
   121 #endif /* CVCXSCHEDULEDDOWNLOADTESTER_H_ */