stif/examples/STIFTestMeasurementStub/src/STIFTestMeasurementStub.cpp
changeset 36 813b186005b6
parent 30 86a2e675b80a
child 41 838cdffd57ce
equal deleted inserted replaced
30:86a2e675b80a 36:813b186005b6
     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 "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: This file contains testmeasurementstub declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include "STIFTestMeasurementStub.h"
       
    20 
       
    21 // EXTERNAL DATA STRUCTURES
       
    22 //extern  ?external_data;
       
    23 
       
    24 // EXTERNAL FUNCTION PROTOTYPES  
       
    25 //extern ?external_function( ?arg_type,?arg_type );
       
    26 
       
    27 // CONSTANTS
       
    28 //const ?type ?constant_var = ?constant;
       
    29 
       
    30 // MACROS
       
    31 //#define ?macro ?macro_def
       
    32 
       
    33 // LOCAL CONSTANTS AND MACROS
       
    34 //const ?type ?constant_var = ?constant;
       
    35 //#define ?macro_name ?macro_def
       
    36 
       
    37 // MODULE DATA STRUCTURES
       
    38 //enum ?declaration
       
    39 //typedef ?declaration
       
    40 
       
    41 // LOCAL FUNCTION PROTOTYPES
       
    42 //?type ?function_name( ?arg_type, ?arg_type );
       
    43 
       
    44 // FORWARD DECLARATIONS
       
    45 //class ?FORWARD_CLASSNAME;
       
    46 
       
    47 // ============================= LOCAL FUNCTIONS ===============================
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // ?function_name ?description.
       
    51 // ?description
       
    52 // Returns: ?value_1: ?description
       
    53 //          ?value_n: ?description_line1
       
    54 //                    ?description_line2
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 /*
       
    58 ?type ?function_name(
       
    59     ?arg_type arg,  // ?description
       
    60     ?arg_type arg)  // ?description
       
    61     {
       
    62 
       
    63     ?code  // ?comment
       
    64 
       
    65     // ?comment
       
    66     ?code
       
    67     }
       
    68 */
       
    69 
       
    70 // ============================ MEMBER FUNCTIONS ===============================
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // CSTIFTestMeasurementStub::CSTIFTestMeasurementStub
       
    74 // C++ default constructor can NOT contain any code, that
       
    75 // might leave.
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 CSTIFTestMeasurementStub::CSTIFTestMeasurementStub( 
       
    79             CSTIFTestMeasurement::TSTIFMeasurementType aMeasurementType ):
       
    80     iMeasurementType( aMeasurementType )
       
    81     {
       
    82 
       
    83     }
       
    84 
       
    85 // -----------------------------------------------------------------------------
       
    86 // CSTIFTestMeasurementStub::ConstructL
       
    87 // Symbian 2nd phase constructor can leave.
       
    88 // -----------------------------------------------------------------------------
       
    89 //
       
    90 void CSTIFTestMeasurementStub::ConstructL( const TDesC& aConfigurationInfo )
       
    91     {
       
    92 
       
    93     }
       
    94 
       
    95 // -----------------------------------------------------------------------------
       
    96 // CSTIFTestMeasurementStub::NewL
       
    97 // Two-phased constructor.
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 CSTIFTestMeasurementStub* CSTIFTestMeasurementStub::NewL(
       
   101                     const TDesC& aConfigurationInfo,
       
   102                     CSTIFTestMeasurement::TSTIFMeasurementType aMeasurementType )
       
   103     {
       
   104     CSTIFTestMeasurementStub* self = new (ELeave) CSTIFTestMeasurementStub( 
       
   105                                                             aMeasurementType );
       
   106 
       
   107     CleanupStack::PushL( self );
       
   108     self->ConstructL( aConfigurationInfo );
       
   109     CleanupStack::Pop();
       
   110 
       
   111     return self;
       
   112 
       
   113     }
       
   114 
       
   115 // Destructor
       
   116 // -----------------------------------------------------------------------------
       
   117 // CSTIFTestMeasurementStub::~CSTIFTestMeasurementStub
       
   118 // Destructor.
       
   119 // -----------------------------------------------------------------------------
       
   120 //
       
   121 CSTIFTestMeasurementStub::~CSTIFTestMeasurementStub()
       
   122     {
       
   123 
       
   124     }
       
   125 
       
   126 // -----------------------------------------------------------------------------
       
   127 // CSTIFTestMeasurementStub::Start
       
   128 // Starts test measurement
       
   129 // Returns Symbian error code
       
   130 // -----------------------------------------------------------------------------
       
   131 //
       
   132 TInt CSTIFTestMeasurementStub::Start( )
       
   133     {
       
   134     return KErrNone;
       
   135 
       
   136     }
       
   137 
       
   138 // -----------------------------------------------------------------------------
       
   139 // CSTIFTestMeasurementStub::Stop
       
   140 // Stops test measurement
       
   141 // Returns Symbian error code
       
   142 // -----------------------------------------------------------------------------
       
   143 //
       
   144 TInt CSTIFTestMeasurementStub::Stop( )
       
   145     {
       
   146     return KErrNone;
       
   147 
       
   148     }
       
   149 
       
   150 // -----------------------------------------------------------------------------
       
   151 // CSTIFTestMeasurementStub::MeasurementType
       
   152 // 
       
   153 // Returns measurement module's type
       
   154 // -----------------------------------------------------------------------------
       
   155 //
       
   156 CSTIFTestMeasurement::TSTIFMeasurementType CSTIFTestMeasurementStub::MeasurementType( )
       
   157     {
       
   158     return iMeasurementType;
       
   159 
       
   160     }
       
   161 
       
   162 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   163 
       
   164 // -----------------------------------------------------------------------------
       
   165 // LibEntryL is a polymorphic Dll entry point
       
   166 // Returns: CSTIFTestMeasurementImplementation*: Pointer to STIF Test 
       
   167 // Measurement Module
       
   168 // object
       
   169 // -----------------------------------------------------------------------------
       
   170 //
       
   171 EXPORT_C CSTIFTestMeasurementImplementation* LibEntryL( 
       
   172                 const TDesC& aConfigurationInfo,
       
   173                 CSTIFTestMeasurement::TSTIFMeasurementType aMeasurementType )
       
   174     {
       
   175     CSTIFTestMeasurementImplementation* measurement;
       
   176     measurement = CSTIFTestMeasurementStub::NewL( 
       
   177                                         aConfigurationInfo, aMeasurementType );
       
   178     return measurement;
       
   179 
       
   180     }
       
   181 
       
   182 // End of File