os/ossrv/stdcpp/tsrc/BC/apps/BCThread/src/BCThreadBlocks.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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:       
    15 *
    16 */
    17 
    18 
    19 
    20 // [INCLUDE FILES] - do not remove
    21 #include <e32svr.h>
    22 #include <StifParser.h>
    23 #include <Stiftestinterface.h>
    24 #include "BCThread.h"
    25 
    26 //Headers exported from thread APi
    27 #include <_pthread_alloc.c>
    28 #include <_pthread_alloc.h>
    29 #include <pthread_alloc>
    30 #include <_threads.c>
    31 #include <_threads.h>
    32 // EXTERNAL DATA STRUCTURES
    33 //extern  ?external_data;
    34 
    35 // EXTERNAL FUNCTION PROTOTYPES  
    36 //extern ?external_function( ?arg_type,?arg_type );
    37 
    38 // CONSTANTS
    39 //const ?type ?constant_var = ?constant;
    40 
    41 // MACROS
    42 //#define ?macro ?macro_def
    43 
    44 // LOCAL CONSTANTS AND MACROS
    45 //const ?type ?constant_var = ?constant;
    46 //#define ?macro_name ?macro_def
    47 
    48 // MODULE DATA STRUCTURES
    49 //enum ?declaration
    50 //typedef ?declaration
    51 
    52 // LOCAL FUNCTION PROTOTYPES
    53 //?type ?function_name( ?arg_type, ?arg_type );
    54 
    55 // FORWARD DECLARATIONS
    56 //class ?FORWARD_CLASSNAME;
    57 
    58 // ============================= LOCAL FUNCTIONS ===============================
    59 
    60 // -----------------------------------------------------------------------------
    61 // ?function_name ?description.
    62 // ?description
    63 // Returns: ?value_1: ?description
    64 //          ?value_n: ?description_line1
    65 //                    ?description_line2
    66 // -----------------------------------------------------------------------------
    67 //
    68 /*
    69 ?type ?function_name(
    70     ?arg_type arg,  // ?description
    71     ?arg_type arg)  // ?description
    72     {
    73 
    74     ?code  // ?comment
    75 
    76     // ?comment
    77     ?code
    78     }
    79 */
    80 
    81 // ============================ MEMBER FUNCTIONS ===============================
    82 
    83 // -----------------------------------------------------------------------------
    84 // CBCThread::Delete
    85 // Delete here all resources allocated and opened from test methods. 
    86 // Called from destructor. 
    87 // -----------------------------------------------------------------------------
    88 //
    89 void CBCThread::Delete() 
    90     {
    91 
    92     }
    93 
    94 // -----------------------------------------------------------------------------
    95 // CBCThread::RunMethodL
    96 // Run specified method. Contains also table of test mothods and their names.
    97 // -----------------------------------------------------------------------------
    98 //
    99 TInt CBCThread::RunMethodL( 
   100     CStifItemParser& aItem ) 
   101     {
   102 
   103     static TStifFunctionInfo const KFunctions[] =
   104         {  
   105         // Copy this line for every implemented function.
   106         // First string is the function name used in TestScripter script file.
   107         // Second is the actual implementation member function. 
   108         ENTRY( "TestAPI", CBCThread::TestAPI ),
   109         //ADD NEW ENTRY HERE
   110         // [test cases entries] - Do not remove
   111 
   112         };
   113 
   114     const TInt count = sizeof( KFunctions ) / 
   115                         sizeof( TStifFunctionInfo );
   116 
   117     return RunInternalL( KFunctions, count, aItem );
   118 
   119     }
   120 
   121 // -----------------------------------------------------------------------------
   122 // CBCThread::TestAPI
   123 // TestAPI test method function.
   124 // (other items were commented in a header).
   125 // -----------------------------------------------------------------------------
   126 //
   127 TInt CBCThread::TestAPI( CStifItemParser& aItem )
   128     {
   129 
   130     // Print to UI
   131     _LIT( KBCThread, "BCThread" );
   132     _LIT( KTestAPI, "In TestAPI" );
   133     TestModuleIf().Printf( 0, KBCThread, KTestAPI );
   134     // Print to log file
   135     iLog->Log( KTestAPI );
   136 
   137  		_LIT( KResult, "No functions to be tested");
   138 		_LIT( KComment, "Thread API has passed");
   139     TestModuleIf().Printf( 0, KResult, KComment);
   140 
   141     return KErrNone;
   142 
   143     }
   144 
   145 // -----------------------------------------------------------------------------
   146 // CBCThread::?member_function
   147 // ?implementation_description
   148 // (other items were commented in a header).
   149 // -----------------------------------------------------------------------------
   150 //
   151 /*
   152 TInt CBCThread::?member_function(
   153    CItemParser& aItem )
   154    {
   155 
   156    ?code
   157 
   158    }
   159 */
   160 
   161 // ========================== OTHER EXPORTED FUNCTIONS =========================
   162 // None
   163 
   164 //  [End of File] - Do not remove