serviceproviders/sapi_applicationmanager/appmanagerservice/inc/launcher.h
changeset 5 989d2f495d90
child 46 5146369cfdc9
equal deleted inserted replaced
1:a36b1e19a461 5:989d2f495d90
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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 the License "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:  This Class provides the functionality to launch the application
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __LAUNCHER_H
       
    21 #define __LAUNCHER_H
       
    22 
       
    23 class TOptions;
       
    24 class RApaLsSession;
       
    25 class CLauncherObserver;
       
    26 class TDocument;
       
    27 
       
    28 
       
    29 /**
       
    30 * This Class provides the core functionality of launching 
       
    31 * the application
       
    32 *
       
    33 * @since  Series60 v3.2
       
    34 */
       
    35 class CLauncher : public CBase
       
    36     {
       
    37 
       
    38     public:
       
    39 
       
    40     	 /**
       
    41         * Returns the instance of CLauncher.
       
    42         * @since  Series60 v3.2
       
    43         * @param  aSession AppArch server session.
       
    44         * @return CLauncher* return the instance of CLauncher class
       
    45         */
       
    46         static CLauncher* NewL( RApaLsSession& aSession );
       
    47 
       
    48             
       
    49      	/**
       
    50         * This function Launch the Given Application
       
    51         * succeed.
       
    52         * @since  Series60 v3.2
       
    53         * @param  aAppId   UID of the application to be launch
       
    54         * @param  aCmdLine Commandline Argument
       
    55         * @param  aOptions mode for laucnhing the appilcation(standalone/chained)
       
    56         * @param  aObserver observer for informing when the launched application dies
       
    57         */
       
    58        	
       
    59         TThreadId LaunchApplicationL( const TDesC& aAppId, 
       
    60                                        const TDesC8& aCmdLine, 
       
    61                                        const TOptions& aOptions );
       
    62        	
       
    63        	/**
       
    64         * This function Launch the Given Document
       
    65         * succeed.
       
    66         * @since  Series60 v3.2
       
    67         * @param  aCriteria Document to be launch 
       
    68         * @param  aMimeType MimeType of application to be launch 
       
    69         * @param  aProperties postion and mode for laucnhing the appilcation(standalone/chained)
       
    70         * @param  aObserver observer for informing when the launched application dies
       
    71         */
       
    72        	TThreadId LaunchDocumentL( TDocument& aCriteria, 
       
    73        	                            const TDesC8& aMimeType, 
       
    74        	                            const TOptions& aProperties , 
       
    75        	                            TDesC& aFileName );
       
    76 
       
    77         
       
    78         /**
       
    79         * Destructor
       
    80         * @since  Series60 v3.2
       
    81         * @param void
       
    82         * @return void
       
    83         */
       
    84         ~CLauncher(); 
       
    85         
       
    86    	private:
       
    87 
       
    88         /**
       
    89         * This function parse the application id string  and convert into TUid 
       
    90         * @since  Series60 v3.2
       
    91         * @param  aSource String to Parse
       
    92         * @param  aUid Returns the Uid from the given string
       
    93         */
       
    94         void ParseAppIdL( const TDesC& aSource ,TUid& aUid );
       
    95         
       
    96          /**
       
    97         * This function parse the application id string  and covert into TUid 
       
    98         * @since  Series60 v3.2
       
    99         * @param  aHexString String conating UID in HEX format
       
   100         * @param  aUid Returns the Uid from the given string 
       
   101         */
       
   102         TInt ConvertHexStringToInt32(const TDesC& aHexString,TInt32& aInt32 );
       
   103        	
       
   104        	 /**
       
   105         * This function will set the application to launch in chained mode 
       
   106         * @since  Series60 v3.2
       
   107         * @param  aCmdLine underlying structure in which chained mode has to set
       
   108         * @param  aAppUid Uid of the applications
       
   109         */
       
   110        	      	
       
   111        	void SetChainedModeL( CApaCommandLine* aCmdLine  , const TUid& aAppUid );
       
   112    	
       
   113    		/**
       
   114         * Constructor
       
   115         * @since  Series60 v3.2
       
   116         * @param void
       
   117         * @return void
       
   118         */
       
   119         CLauncher( RApaLsSession& aSession);
       
   120         
       
   121      
       
   122 
       
   123 
       
   124     private:
       
   125     
       
   126        /**
       
   127      	* Session of application architecture server
       
   128      	*/
       
   129       
       
   130         RApaLsSession& iApaLsSession;
       
   131 
       
   132       };
       
   133 
       
   134 #endif __LAUNCHER_H