javamanager/javainstaller/javasifplugin/inc/javasifplugin.h
changeset 48 e0d6e9bd3ca7
parent 47 f40128debb5d
child 61 bf7ee68962da
--- a/javamanager/javainstaller/javasifplugin/inc/javasifplugin.h	Wed Jun 23 18:07:10 2010 +0300
+++ b/javamanager/javainstaller/javasifplugin/inc/javasifplugin.h	Tue Jul 06 14:10:26 2010 +0300
@@ -25,7 +25,8 @@
 #include <usif/sif/sifplugin.h>
 
 #include "f32file.h"
-#include "resultsserver.h"
+
+class ResultsServer;
 
 using namespace Usif;
 
@@ -36,9 +37,9 @@
 const int INSTALLER_CANCEL_MESSAGE_ID = 603;
 const int INSTALLER_CANCEL_RESPONSE_MESSAGE_ID = 604;
 
-namespace Java
+namespace java
 {
-namespace Installer
+namespace installer
 {
 
 /**
@@ -222,11 +223,31 @@
     void CopyFilesIfNeededL(TFileName &aFileName);
 
     /**
+     * Check if the file is Jad file. Argument KSifInParam_MimeType is
+     * used for check if it exists.
+     *
+     * @param[in] aFileHandle the file to be checked
+     * @param[in] aArguments Install request arguments
+     * @param[out] aIsJad set to ETrue if the file is Jad file
+     * @return KErrNone or Symbian error code
+     */
+    TInt IsJadFile(RFile& aFileHandle, const COpaqueNamedParams& aArguments, TBool& aIsJad);
+
+    /**
+     * Check if the file is Jad file.
+     *
+     * @param[in] aFileHandle the file to be checked
+     * @param[out] aIsJad set to ETrue if the file is Jad file
+     * @return KErrNone or Symbian error code
+     */
+    TInt IsJadFile(RFile& aFileHandle, TBool& aIsJad);
+
+    /**
      * Uses the information in aArguments to create the correct command line for
      * Java Installer.
      *
-     * @param aCommandLine the buffer to be filled with command line arguments
-     * @param aArguments The array of opaque params for the plug-in. An empty
+     * @param[in][out] aCommandLine the buffer to be filled with command line arguments
+     * @param[in]      aArguments The array of opaque params for the plug-in. An empty
      *   array may be passed.  The following param is defined for the "SCOMO Install
      *   Inactive" operation:
      *   Name: InstallInactive, Type: Int, Value: ETrue
@@ -234,10 +255,37 @@
      *   State should remain EDeactivated.
      */
     void BuildInstallCommandLine(
-        TBuf<1536>& aCommandLine,
+        TPtr& aCommandLine,
+        const COpaqueNamedParams& aArguments);
+
+    /**
+     * Returns the value of int param found from aArguments or -1 if
+     * the param is not found. Must be called only for int params
+     * that have positive value range!
+     *
+     * @param[in] aName The name of the integer param to be obtained.
+     * @param[in] aArguments The array of opaque params for the plug-in.
+     * @return -1 if the named param if not found, otherwise the value of the
+     */
+    TInt GetPositiveIntParam(
+        const TDesC& aName,
         const COpaqueNamedParams& aArguments);
 
     /**
+     * Start ResultsServer for receiving Comms message(s) from
+     * Java Installer
+     *
+     * @param[in][out] aResults If Comms message contains installation or
+     *  uninstallation operation results, they will be stored in this variable
+     * @param[in][out] aComponentInfo If Comms message contains contains details of
+     *  a component, they will be stored into this variable
+     * @return
+     */
+    TInt StartResultsServer(
+        COpaqueNamedParams& aResults,
+        CComponentInfo& aComponentInfo);
+
+    /**
      * If Java Installer is already running, set error category EInstallerBusy etc
      * to aResults, set aStatus to KErrAlreadyExists and return ETrue
      * @param[in][out] aResults
@@ -248,23 +296,14 @@
         COpaqueNamedParams& aResults,
         TRequestStatus& aStatus);
 
-    /**
-     * If Java Installer is already running,
-     * set aStatus to KErrAlreadyExists and return ETrue
-     * @param[in][out] aStatus
-     * @return ETrue if Java Installer is running
-     */
-    TBool ExitIfJavaInstallerRunning(TRequestStatus& aStatus);
-
 private: //  Data
 
-    TRequestStatus* iStatus;
-    RFs iRFs;
-    RArray<RProcess> iHandlesToClose;
-    ResultsServer*   iResultsServer;
+    RFs mRFs;
+    RArray<RProcess> mHandlesToClose;
+    ResultsServer*   mResultsServer;
 
-    COpaqueNamedParams* iDummyResults;
-    CComponentInfo*     iDummyInfo;
+    COpaqueNamedParams* mDummyResults;
+    CComponentInfo*     mDummyInfo;
 };
 
 } // Installer