commands/variant/variant.cpp
changeset 49 4a2ffd3562a3
parent 0 7f656887cf89
child 52 96bfe2624d23
equal deleted inserted replaced
48:d9b3ed11f017 49:4a2ffd3562a3
    70 	};
    70 	};
    71 const TInt KMachineIdVariantCount = sizeof(KMachineIdVariants) / sizeof(TVariant);
    71 const TInt KMachineIdVariantCount = sizeof(KMachineIdVariants) / sizeof(TVariant);
    72 
    72 
    73 void CCmdVariant::DoRunL()
    73 void CCmdVariant::DoRunL()
    74 	{
    74 	{
       
    75 	if (iList)
       
    76 		{
       
    77 		Printf(_L("Supported variants: "));
       
    78 		for (TInt i = 0; i < KMachineIdVariantCount; i++)
       
    79 			{
       
    80 			Printf(_L("%S, "), &KMachineIdVariants[i].iName);
       
    81 			}
       
    82 		// Finally add the ones which don't appear in KMachineIdVariants
       
    83 		Write(_L("wins, target\r\n"));
       
    84 		Complete(KErrNone);
       
    85 		return;
       
    86 		}
       
    87 
    75 	if (iMachineId.Count() == 0 && iVariant.Count() == 0)
    88 	if (iMachineId.Count() == 0 && iVariant.Count() == 0)
    76 		{
    89 		{
    77 		LeaveIfErr(KErrArgument, _L("You must specify at least one <variantname> argument or --uid option"));
    90 		LeaveIfErr(KErrArgument, _L("You must specify at least one <variantname> argument or --uid option"));
    78 		}
    91 		}
    79 
    92 
   135 	{
   148 	{
   136 	_LIT(KCmdOptUid, "uid");
   149 	_LIT(KCmdOptUid, "uid");
   137 	aOptions.AppendUintL(iMachineId, KCmdOptUid);
   150 	aOptions.AppendUintL(iMachineId, KCmdOptUid);
   138 	_LIT(KOptVerbose, "verbose");
   151 	_LIT(KOptVerbose, "verbose");
   139 	aOptions.AppendBoolL(iVerbose, KOptVerbose);
   152 	aOptions.AppendBoolL(iVerbose, KOptVerbose);
       
   153 	_LIT(KOptList, "list");
       
   154 	aOptions.AppendBoolL(iList, KOptList);
   140 	}
   155 	}
   141 
   156 
   142 //
   157 //
   143 // CCmdVariant::GetMachineUidL
   158 // CCmdVariant::GetMachineUidL
   144 // retrieve the variant's machine uid
   159 // retrieve the variant's machine uid