author | Tom Sutcliffe <thomas.sutcliffe@accenture.com> |
Thu, 04 Nov 2010 23:22:39 +0000 | |
changeset 100 | 706c7a69e448 |
parent 83 | 2a78c4ff2eab |
permissions | -rw-r--r-- |
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
1 |
// variant.cpp |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
2 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
3 |
// Copyright (c) 2008 - 2010 Accenture. All rights reserved. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
4 |
// This component and the accompanying materials are made available |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
5 |
// under the terms of the "Eclipse Public License v1.0" |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
6 |
// which accompanies this distribution, and is available |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
8 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
9 |
// Initial Contributors: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
10 |
// Accenture - Initial contribution |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
11 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
12 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
13 |
#include <hal.h> |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
14 |
#include "variant.h" |
58
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
15 |
#include <fshell/common.mmh> |
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
16 |
#include <fshell/descriptorutils.h> |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
17 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
18 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
19 |
// CCmdVariant |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
20 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
21 |
CCommandBase* CCmdVariant::NewLC() |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
22 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
23 |
CCmdVariant* self = new (ELeave) CCmdVariant(); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
24 |
CleanupStack::PushL(self); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
25 |
self->BaseConstructL(); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
26 |
return self; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
27 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
28 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
29 |
CCmdVariant::~CCmdVariant() |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
30 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
31 |
iVariant.ResetAndDestroy(); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
32 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
33 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
34 |
CCmdVariant::CCmdVariant() : |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
35 |
CCommandBase(CCommandBase::EManualComplete) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
36 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
37 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
38 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
39 |
const TDesC& CCmdVariant::Name() const |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
40 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
41 |
_LIT(KName, "variant"); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
42 |
return KName; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
43 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
44 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
45 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
46 |
// CCmdVariant::DoRunL |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
47 |
// looks for a match between the variant uids specified via the command line and the |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
48 |
// actual variant uid of the device |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
49 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
50 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
51 |
struct TVariant |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
52 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
53 |
TInt iUid; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
54 |
LtkUtils::SLitC iName; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
55 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
56 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
57 |
// Only shipping products or established reference hardware platforms in here please. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
58 |
// Unannounced protos should have their platform build its own variant.exe to identify their hardware, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
59 |
// alternatively people have to rely on doing a "variant --uid xyz" whichever is preferred by the platform |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
60 |
const TVariant KMachineIdVariants[] = { |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
61 |
{ 0x102734E3, DESC("h4") }, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
62 |
{ 0x10286564, DESC("h6") }, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
63 |
{ 0x102864F7, DESC("naviengine") }, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
64 |
{ 0x20002D82, DESC("n96") }, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
65 |
{ 0x20002496, DESC("e90") }, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
66 |
{ 0x20002D7E, DESC("6120") }, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
67 |
{ 0x20002D83, DESC("n81") }, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
68 |
{ 0x2000DA56, DESC("5800") }, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
69 |
{ 0x2001F0A1, DESC("satio") }, // I assume this is what it shipped with... |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
70 |
{ 0x20029a73, DESC("n8") }, // Likewise... |
83
2a78c4ff2eab
Migrated ciftest and various fixes from FCL to MCL.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
58
diff
changeset
|
71 |
{ 0x102734e3, DESC("qemu") }, // This is the same as H4! Doh... |
2a78c4ff2eab
Migrated ciftest and various fixes from FCL to MCL.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
58
diff
changeset
|
72 |
{ 0x10286F79, DESC("beagle") }, |
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
73 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
74 |
const TInt KMachineIdVariantCount = sizeof(KMachineIdVariants) / sizeof(TVariant); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
75 |
|
58
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
76 |
// This is a list of things configured in or out at compile time based on the platform.mmh macros and similar |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
77 |
const LtkUtils::SLitC KOtherSupportedVariants[] = |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
78 |
{ |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
79 |
#ifdef __WINS__ |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
80 |
DESC("wins"), |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
81 |
#else |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
82 |
DESC("target"), |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
83 |
#endif |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
84 |
#ifdef FSHELL_TRACECORE_SUPPORT |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
85 |
DESC("tracecore-support"), |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
86 |
#endif |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
87 |
}; |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
88 |
const TInt KOtherSupportedVariantsCount = sizeof(KOtherSupportedVariants) / sizeof(LtkUtils::SLitC); |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
89 |
|
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
90 |
void CCmdVariant::DoRunL() |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
91 |
{ |
58
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
92 |
TInt localMachineUid = GetMachineUidL(); |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
93 |
|
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
94 |
if (iMachineId.Count() == 0 && iVariant.Count() == 0) |
49
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
95 |
{ |
58
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
96 |
Printf(_L("Variant names understood by this command: ")); |
49
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
97 |
for (TInt i = 0; i < KMachineIdVariantCount; i++) |
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
98 |
{ |
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
99 |
Printf(_L("%S, "), &KMachineIdVariants[i].iName); |
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
100 |
} |
58
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
101 |
// Finally add the ones which can appear in KOtherSupportedVariants |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
102 |
Printf(_L("wins, target, tracecore-support\r\n")); |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
103 |
|
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
104 |
Printf(_L("Variant names supported by this device: ")); |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
105 |
for (TInt i = 0; i < KMachineIdVariantCount; i++) |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
106 |
{ |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
107 |
if (localMachineUid == KMachineIdVariants[i].iUid) |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
108 |
{ |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
109 |
Printf(_L("%S, "), &KMachineIdVariants[i].iName); |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
110 |
} |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
111 |
} |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
112 |
for (TInt i = 0; i < KOtherSupportedVariantsCount; i++) |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
113 |
{ |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
114 |
if (i > 0) Printf(_L(", ")); |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
115 |
Printf(KOtherSupportedVariants[i]()); |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
116 |
} |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
117 |
Printf(_L("\r\n")); |
49
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
118 |
Complete(KErrNone); |
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
119 |
return; |
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
120 |
} |
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
121 |
|
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
122 |
TBool match = EFalse; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
123 |
if (iMachineId.Count()) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
124 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
125 |
for (TInt i = 0; i < iMachineId.Count(); i++) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
126 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
127 |
if (iMachineId[i] == (TUint)localMachineUid) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
128 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
129 |
match = ETrue; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
130 |
break; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
131 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
132 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
133 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
134 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
135 |
if (iVariant.Count()) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
136 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
137 |
for (TInt i = 0; match == EFalse && i < iVariant.Count(); i++) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
138 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
139 |
for (TInt j = 0; match == EFalse && j < KMachineIdVariantCount; j++) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
140 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
141 |
if (iVariant[i]->CompareF(KMachineIdVariants[j].iName) == 0 && localMachineUid == KMachineIdVariants[j].iUid) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
142 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
143 |
match = ETrue; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
144 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
145 |
} |
58
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
146 |
|
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
147 |
for (TInt j = 0; match == EFalse && j < KOtherSupportedVariantsCount; j++) |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
148 |
{ |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
149 |
if (iVariant[i]->CompareF(KOtherSupportedVariants[j]) == 0) |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
150 |
{ |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
151 |
match = ETrue; |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
152 |
} |
b33ec37addee
comm.script/FSHELL_AUTOSTART now launches terminalkeyboardcons on platforms that support tracecore.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
52
diff
changeset
|
153 |
} |
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
154 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
155 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
156 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
157 |
if (iVerbose) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
158 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
159 |
if (match) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
160 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
161 |
Printf(_L("Specified variant supported\r\n")); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
162 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
163 |
else |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
164 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
165 |
PrintError(KErrNotSupported, _L("Specified variant not supported")); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
166 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
167 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
168 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
169 |
SetErrorReported(ETrue); // Don't show the error |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
170 |
Complete(match ? KErrNone : KErrNotSupported); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
171 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
172 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
173 |
void CCmdVariant::ArgumentsL(RCommandArgumentList& aArguments) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
174 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
175 |
aArguments.AppendStringL(iVariant, _L("variantname")); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
176 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
177 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
178 |
void CCmdVariant::OptionsL(RCommandOptionList& aOptions) |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
179 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
180 |
_LIT(KCmdOptUid, "uid"); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
181 |
aOptions.AppendUintL(iMachineId, KCmdOptUid); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
182 |
_LIT(KOptVerbose, "verbose"); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
183 |
aOptions.AppendBoolL(iVerbose, KOptVerbose); |
49
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
184 |
_LIT(KOptList, "list"); |
4a2ffd3562a3
Added --list option to variant command
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
185 |
aOptions.AppendBoolL(iList, KOptList); |
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
186 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
187 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
188 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
189 |
// CCmdVariant::GetMachineUidL |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
190 |
// retrieve the variant's machine uid |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
191 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
192 |
TInt CCmdVariant::GetMachineUidL() |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
193 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
194 |
TInt value = KErrNotSupported; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
195 |
User::LeaveIfError(HAL::Get(HALData::EMachineUid, value)); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
196 |
return value; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
197 |
} |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
198 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
199 |
EXE_BOILER_PLATE(CCmdVariant) |