videofeeds/server/tsrc/IptvTestUtility/inc/CIptvTestDlFileInfo.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:   class to store information about download*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CIPTVTESTDLFILEINFO_H
       
    21 #define CIPTVTESTDLFILEINFO_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "CIptvTestLogger.h"
       
    26 #include "CIptvUtil.h"
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // DATA TYPES
       
    33 
       
    34 // FUNCTION PROTOTYPES
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 
       
    38 // CLASS DECLARATION
       
    39 class CIptvTestLogger;
       
    40 
       
    41 //small class for saving download events
       
    42 NONSHARABLE_CLASS(TIptvTestDlEvents)
       
    43     {
       
    44     public:
       
    45         TIptvTestDlEvents(); 
       
    46         virtual ~TIptvTestDlEvents();
       
    47         void SetValues(TUint32 aState, TIptvDlError aError);
       
    48                
       
    49     public:
       
    50         TTime iTime;
       
    51         TUint32 iState;
       
    52         TIptvDlError iError;
       
    53     };
       
    54 
       
    55 
       
    56 //class for saving fileinfo while downloading
       
    57 
       
    58 /**
       
    59 *  @since
       
    60 */
       
    61 
       
    62     
       
    63 class CIptvTestDlFileInfo : public CBase
       
    64     {
       
    65     public:  // Constructors and destructor
       
    66         
       
    67          /**
       
    68         * Two-phased constructor.
       
    69         */
       
    70         IMPORT_C static CIptvTestDlFileInfo* NewL();
       
    71 
       
    72         /**
       
    73         * Destructor.
       
    74         */
       
    75         IMPORT_C virtual ~CIptvTestDlFileInfo();
       
    76         
       
    77         enum TDlFileInfoError
       
    78             {
       
    79             EDlFileInfoIdle,
       
    80             EDlFileInfoDlGoing,
       
    81             EDlFileInfoTimeOut,
       
    82             EDlFileInfoStartFailed,
       
    83             EDlFileInfoDestructorCalled
       
    84             };
       
    85 					
       
    86 		void DlStarted(
       
    87 						TUint32 aIapId,
       
    88 						TDesC& aIapName,
       
    89 						TIptvServiceId aServiceId,
       
    90 						TDesC& aServiceName,
       
    91 						TIptvContentId aContentId,
       
    92 						TIptvDownloadType aDlType,
       
    93 						HBufC* aDlUrl 
       
    94 						);
       
    95         
       
    96         void DlUpdateState( 
       
    97 						TUint32 aState, 
       
    98 						TIptvDlError aError);
       
    99         
       
   100         void DlGoing( 
       
   101 				TDesC& aFullPath,
       
   102 				TUint32 aState, 
       
   103 				TIptvDlError aError );
       
   104         						
       
   105         void DlStopped(
       
   106     			TUint32	aFileSize, 
       
   107     			TUint32 aState, 
       
   108     			TIptvDlError aError);
       
   109     			
       
   110     	void DlTimeOut();
       
   111         							
       
   112         void DlStartFailed(TIptvDlError aError);
       
   113         							
       
   114         void Print();
       
   115         
       
   116         TDesC& GetFileName();
       
   117     
       
   118     protected: 
       
   119 	    
       
   120    
       
   121     private:
       
   122 				/**
       
   123         * C++ default constructor.
       
   124         */
       
   125         CIptvTestDlFileInfo();
       
   126 
       
   127         /**
       
   128         * By default Symbian 2nd phase constructor is private.
       
   129         */
       
   130         void ConstructL( );
       
   131       
       
   132     public:
       
   133     	TUint32 iServiceId;
       
   134     	TUint32 iContentId;
       
   135     
       
   136     private:    // Data
       
   137     	TUint32 	iIapId;
       
   138     	TBuf<255> 	iIapName;
       
   139     	TBuf<255> 	iServiceName;
       
   140     	HBufC*      iContentUrl;    			
       
   141     	TIptvDownloadType iDlType;
       
   142         TBuf<255>   iFullPath;
       
   143         TBool       iDlSucceed;
       
   144         TUint32		iFileSize;
       
   145         TTime       iStartTime;
       
   146         TTime		iStopTime;
       
   147         TDlFileInfoError iDlFileInfoError;
       
   148         
       
   149         CIptvTestLogger* iIptvTestLogger;
       
   150 
       
   151         RArray<TIptvTestDlEvents> iDlEvents;
       
   152     
       
   153     };
       
   154 
       
   155 #endif      // CIPTVTESTDLFILEINFO_H   
       
   156             
       
   157 // End of File
       
   158