javamanager/javacaptain/systemams/src/main.cpp
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     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:  Start point of the OMJ trader process
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 #include "logger.h"
       
    22 
       
    23 #include "systemamstrader.h"
       
    24 
       
    25 
       
    26 int main(int argc, char **argv[])
       
    27 {
       
    28     JELOG2(EJavaSystemAMS);
       
    29     CTrapCleanup* cleanupStack = CTrapCleanup::New();
       
    30 
       
    31     // Pass 'iad' argument if it has been given
       
    32 
       
    33     TInt  err(KErrNone);
       
    34     TBool iadStart(EFalse);
       
    35     for (TInt nInd = 0; nInd < argc; nInd++)
       
    36     {
       
    37         char **tmp = argv[nInd];
       
    38         char *curArg = (char *)tmp;
       
    39         if (!strcmp(curArg, "iad"))
       
    40         {
       
    41             iadStart = ETrue;
       
    42         }
       
    43     }
       
    44 
       
    45     if (iadStart)
       
    46     {
       
    47         LOG(EJavaSystemAMS, EInfo, "systemams.exe started with iad param");
       
    48     }
       
    49     else
       
    50     {
       
    51         LOG(EJavaSystemAMS, EInfo, "systemams.exe started without iad param");
       
    52     }
       
    53 
       
    54     TRAP(err, CSystemAMSTrader::StartL(iadStart));
       
    55     if (KErrNone != err)
       
    56     {
       
    57         ELOG1(EJavaSystemAMS, "systemams.exe: StartL leaved with error %d", err);
       
    58     }
       
    59     delete cleanupStack;
       
    60 }