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