diff -r e5618cc85d74 -r 6c158198356e javamanager/javainstaller/javasifplugin/inc/javasifplugin.h --- a/javamanager/javainstaller/javasifplugin/inc/javasifplugin.h Thu Jul 15 18:31:06 2010 +0300 +++ b/javamanager/javainstaller/javasifplugin/inc/javasifplugin.h Thu Aug 19 09:48:13 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -22,10 +22,13 @@ #define JAVASIFPLUGIN_H #include +#include #include +#include "asyncwaitcallback.h" #include "f32file.h" -#include "resultsserver.h" + +class ResultsServer; using namespace Usif; @@ -36,9 +39,9 @@ const int INSTALLER_CANCEL_MESSAGE_ID = 603; const int INSTALLER_CANCEL_RESPONSE_MESSAGE_ID = 604; -namespace Java +namespace java { -namespace Installer +namespace installer { /** @@ -195,6 +198,11 @@ virtual void CancelOperation(); + /** + * Hides 'preparing installation' dialog. + */ + void HidePrepInstDialogL(); + private: /** @@ -221,16 +229,96 @@ */ 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[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 + * If a plug-in receives this param, it must install a component normally but the SCOMO + * State should remain EDeactivated. + */ + void BuildInstallCommandLine( + 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 + * @param[in][out] aStatus + * @return ETrue if Java Installer is running + */ + TBool ExitIfJavaInstallerRunning( + COpaqueNamedParams& aResults, + TRequestStatus& aStatus); + + /** + * Creates 'preparing installation' dialog. + */ + void CreatePrepInstDialogL(); private: // Data - TRequestStatus* iStatus; - RFs iRFs; - RArray iHandlesToClose; - ResultsServer* iResultsServer; + RFs mRFs; + RArray mHandlesToClose; + ResultsServer* mResultsServer; - COpaqueNamedParams* iDummyResults; - CComponentInfo* iDummyInfo; + COpaqueNamedParams* mDummyResults; + CComponentInfo* mDummyInfo; + + CHbDeviceNotificationDialogSymbian* mPrepInstDialog; + CAsyncWaitCallBack* mWaitToHideDialog; }; } // Installer