javamanager/javalauncher/src.s60/javalauncher.cpp
changeset 47 f40128debb5d
parent 35 85266cc22c7f
equal deleted inserted replaced
35:85266cc22c7f 47:f40128debb5d
    90     JavaStorageEntry attribute;
    90     JavaStorageEntry attribute;
    91     JavaStorageApplicationEntry_t findPattern;
    91     JavaStorageApplicationEntry_t findPattern;
    92     JavaStorageApplicationList_t  foundEntries;
    92     JavaStorageApplicationList_t  foundEntries;
    93 
    93 
    94 
    94 
    95     // Get MIDlet-n from APPLICATION_PACKAGE_ATTRIBUTES_TABLE based on 
    95     // Get MIDlet-n from APPLICATION_PACKAGE_ATTRIBUTES_TABLE based on
    96     // PACKAGE_ID and NAME.
    96     // PACKAGE_ID and NAME.
    97     attribute.setEntry(ID, aPackageId);
    97     attribute.setEntry(ID, aPackageId);
    98     findPattern.insert(attribute);
    98     findPattern.insert(attribute);
    99     attribute.setEntry(NAME, midletId);
    99     attribute.setEntry(NAME, midletId);
   100     findPattern.insert(attribute);
   100     findPattern.insert(attribute);
   105     if (foundEntries.size() < 1)
   105     if (foundEntries.size() < 1)
   106     {
   106     {
   107         return KErrNotFound;
   107         return KErrNotFound;
   108     }
   108     }
   109 
   109 
   110     // Found the MIDlet-n argument. Now getting the MIDlet name and 
   110     // Found the MIDlet-n argument. Now getting the MIDlet name and
   111     // main class. Name is the first argument and main class is the last
   111     // main class. Name is the first argument and main class is the last
   112     // in the comma separated list.
   112     // in the comma separated list.
   113     std::wstring value = foundEntries.front().begin()->entryValue();
   113     std::wstring value = foundEntries.front().begin()->entryValue();
   114     int pos = value.find_first_of(L",");
   114     int pos = value.find_first_of(L",");
   115     std::wstring midletName = value.substr(0, pos);
   115     std::wstring midletName = value.substr(0, pos);
   547     {
   547     {
   548         // Can the midlet uid be determined using info in the commandline?
   548         // Can the midlet uid be determined using info in the commandline?
   549         err = getUidFromCommandLine(cmdLineBuf, uid);
   549         err = getUidFromCommandLine(cmdLineBuf, uid);
   550         if (KErrNone != err)
   550         if (KErrNone != err)
   551         {
   551         {
       
   552             ELOG1WSTR(EJavaCaptain,
       
   553                 "JavaLauncher: process command line was %s",
       
   554                  (wchar_t *)(cmdLineBuf.PtrZ()));
       
   555 
   552             CleanupStack::PopAndDestroy(pBufCmdLine);
   556             CleanupStack::PopAndDestroy(pBufCmdLine);
   553             CleanupStack::PopAndDestroy(commandLine);
   557             CleanupStack::PopAndDestroy(commandLine);
   554             return err;
   558             return err;
   555         }
   559         }
   556     }
   560     }
   771     {
   775     {
   772         ELOG1(EJavaCaptain,
   776         ELOG1(EJavaCaptain,
   773               "javalauncher: OMJ app launch: Exception %s caught", e.what());
   777               "javalauncher: OMJ app launch: Exception %s caught", e.what());
   774     }
   778     }
   775 
   779 
       
   780     delete pBufCmdLine;
       
   781 
   776     return err;
   782     return err;
   777 }
   783 }
   778 
   784 
   779 
   785 
   780 /**
   786 /**