remotemgmt_plat/diagnostics_results_api/inc/diagresultsdbrecordengineparam.h
branchRCL_3
changeset 26 19bba8228ff0
parent 0 b497e44ab2fc
equal deleted inserted replaced
25:b183ec05bd8c 26:19bba8228ff0
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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 "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:  Capsulates parameters of the diagnostics engine.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DIAGRESULTSDBRECORDENGINEPARAM_H
       
    20 #define DIAGRESULTSDBRECORDENGINEPARAM_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>            // CBase
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class RWriteStream;
       
    27 class RReadStream;
       
    28 
       
    29 /**
       
    30 * Contains parameters of the diagnostics engine.
       
    31 * Parameters are needed only in suspend/resume functionality.
       
    32 *
       
    33 * @since S60 v5.0
       
    34 **/
       
    35 class CDiagResultsDbRecordEngineParam : public CBase
       
    36     {
       
    37 public:
       
    38 
       
    39 
       
    40     /**
       
    41     * NewL. Construct from a stream.
       
    42     * @param aStream   Stream to read from.
       
    43     */
       
    44     IMPORT_C static CDiagResultsDbRecordEngineParam* NewL ( RReadStream& aStream );
       
    45         
       
    46     /**
       
    47     * NewL. Ownership of RArray is transferred.
       
    48     *
       
    49     * @param aInitialUids Execution Uid array. Should not be null. 
       
    50     *                     Use empty array if there are no uids.
       
    51     * @param aDependencyExecution This value is needed when resuming 
       
    52     *                             in order to create proper test resume plan.
       
    53     */
       
    54     IMPORT_C static CDiagResultsDbRecordEngineParam* NewL (
       
    55                                         RArray<TUid>*   aInitialUids,
       
    56                                         TBool           aDependencyExecution
       
    57                                         );
       
    58     /**
       
    59     * NewLC. Ownership of RArray is transferred.
       
    60     *
       
    61     * @param aInitialUids Execution Uid array. Should not be null. 
       
    62     *                     Use empty array if there are no uids.
       
    63     * @param aDependencyExecution This value is needed when resuming 
       
    64     *                             in order to create proper test resume plan.
       
    65     */
       
    66     IMPORT_C static CDiagResultsDbRecordEngineParam* NewLC (
       
    67                                         RArray<TUid>*   aInitialUids,
       
    68                                         TBool           aDependencyExecution
       
    69                                         );
       
    70 
       
    71     /**
       
    72     * Destructor.
       
    73     */
       
    74     IMPORT_C virtual ~CDiagResultsDbRecordEngineParam();
       
    75    
       
    76     /**
       
    77     * Return execution uids. These can be used to store for example 
       
    78     * user selections. User selections are needed when test run is suspended 
       
    79     * or test session crashed the phone.
       
    80     *
       
    81     * @return Array of uids. Empty if none.
       
    82     */
       
    83     IMPORT_C const RArray<TUid>& ExecutionsUidArray() const;
       
    84     
       
    85     /**
       
    86     * Indicates were dependencies resolved when diagnostics engine executed tests.
       
    87     *
       
    88     * @return ETrue if dependencies were resolved, EFalse otherwise.
       
    89     */
       
    90     IMPORT_C TBool DependencyExecution() const;
       
    91     
       
    92 public: 
       
    93 
       
    94     /**
       
    95     * Externalize the test result to a stream.
       
    96     *
       
    97     * @param aStream   Stream to write to.
       
    98     */
       
    99     IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; 
       
   100 
       
   101 
       
   102 private: //internalization methods   
       
   103 
       
   104     /**
       
   105     * Internalize the test result from a stream.
       
   106     *
       
   107     * @param aStream   Stream to read from.
       
   108     */
       
   109     IMPORT_C void InternalizeL( RReadStream& aStream );
       
   110     
       
   111   
       
   112 private:
       
   113     
       
   114     /**
       
   115     * C++ Constructors.
       
   116     */
       
   117     CDiagResultsDbRecordEngineParam ( RArray<TUid>* aInitialUids,
       
   118                                       TBool         aDependencyExecution );
       
   119     
       
   120     /**
       
   121     * Construct from a stream.
       
   122     *
       
   123     * @param aStream Read stream.
       
   124     */ 
       
   125     void ConstructL ( RReadStream& aStream );
       
   126     
       
   127     /**
       
   128     * Default constructL. Does nothing.
       
   129     */ 
       
   130     void ConstructL ();
       
   131     
       
   132     /**
       
   133     * Default C++ constructor.
       
   134     **/
       
   135     CDiagResultsDbRecordEngineParam ();
       
   136     
       
   137 private:    // data
       
   138 
       
   139     // Execution uid array
       
   140     RArray<TUid>*               iExecutionUids;
       
   141     
       
   142     //Dependency resolving state.
       
   143     TBool                       iDependencyExecution;
       
   144     
       
   145     };
       
   146 
       
   147 #endif // DIAGRESULTSDBRECORDENGINEPARAM_H