stif/TestCombiner/src/StifPythonFunComb.cpp
branchRCL_3
changeset 59 8ad140f3dd41
equal deleted inserted replaced
49:7fdc9a71d314 59:8ad140f3dd41
       
     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 StifPythonFunComb implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "StifPythonFunComb.h"
       
    21 #include <e32svr.h>
       
    22 
       
    23 // EXTERNAL DATA STRUCTURES
       
    24 // None
       
    25 
       
    26 // EXTERNAL FUNCTION PROTOTYPES
       
    27 // None
       
    28 
       
    29 // CONSTANTS
       
    30 // None
       
    31 
       
    32 // MACROS
       
    33 // None
       
    34 
       
    35 // LOCAL CONSTANTS AND MACROS
       
    36 // None
       
    37 
       
    38 // MODULE DATA STRUCTURES
       
    39 // None
       
    40 
       
    41 // LOCAL FUNCTION PROTOTYPES
       
    42 // None
       
    43 
       
    44 // FORWARD DECLARATIONS
       
    45 // None
       
    46 
       
    47 // ============================= LOCAL FUNCTIONS ===============================
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // GetNewIndexForThreadL
       
    51 // Function countss all threads named like pythonscripter* and returns index for
       
    52 // the new thread for pythonscripter.
       
    53 // -----------------------------------------------------------------------------
       
    54 TInt GetNewIndexForThreadL(void)
       
    55 	{
       
    56 	TInt max_index = 0;
       
    57 	// * as a wildcard for the name search
       
    58 	_LIT(KFindAll, "pythonscripter*");
       
    59 
       
    60 	// default RThread object, has a handle of the current thread
       
    61 	RThread thread;
       
    62 	TFullName fullName;
       
    63 	TFindThread finder(KFindAll);
       
    64 
       
    65 	while(finder.Next(fullName) == KErrNone)
       
    66 		{
       
    67 		max_index++;
       
    68 		}
       
    69 	return max_index;
       
    70 	}
       
    71 //
       
    72 // ============================ MEMBER FUNCTIONS ===============================
       
    73 
       
    74 // End of File