imservices/ossprotocoladaptation/inc/processlauncher/processlaunher.h
branchRCL_3
changeset 14 7797b2f86d2b
parent 13 b6f2a363adf7
child 16 cfe5eb8bb9ca
equal deleted inserted replaced
13:b6f2a363adf7 14:7797b2f86d2b
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  Offers launching of given process
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CPROCESSLAUNCHER_H__
       
    21 #define __CPROCESSLAUNCHER_H__
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 
       
    27 /**
       
    28 *  CProcessLauncher
       
    29 *  The implementation for launching of  processes
       
    30 *
       
    31 */
       
    32 
       
    33 class CProcessLauncher : public CActive
       
    34 	{
       
    35 
       
    36 	public:  // Constructors and destructor
       
    37 
       
    38 		/**
       
    39 		* Two-phased constructor.
       
    40 		*/
       
    41 		static CProcessLauncher* NewL ( const TDesC16& aprocessname );
       
    42 
       
    43 		/**
       
    44 		* Destructor.
       
    45 		*/
       
    46 		~CProcessLauncher();
       
    47 
       
    48 
       
    49 	public:
       
    50 
       
    51 		/**
       
    52 		* Does the launching of given process
       
    53 		*/
       
    54 		void LaunchProcessL();
       
    55 
       
    56 
       
    57 	private:
       
    58 
       
    59 		/**
       
    60 		* C++ default constructor.
       
    61 		* @param aReconnHandler Handler for global reconnect continuation query
       
    62 		*/
       
    63 		CProcessLauncher();
       
    64 
       
    65 		/**
       
    66 		* By default Symbian 2nd phase constructor is private.
       
    67 		*/
       
    68 		void ConstructL ( const TDesC16& aprocessname );
       
    69 
       
    70 
       
    71 	protected:
       
    72 		/**
       
    73 	   	 * @see CActive.
       
    74 	   	 */
       
    75 		void DoCancel();
       
    76 
       
    77 	   /**
       
    78 		* @see CActive.
       
    79 		*/
       
    80 		void RunL();
       
    81 
       
    82 	   /**
       
    83 		* @see CActive.
       
    84 		*/
       
    85 		TInt RunError ( TInt aError );
       
    86 
       
    87 	private:  //data
       
    88 	   /**
       
    89 		* process launcher
       
    90 		*/
       
    91 		RProcess iLauncher;
       
    92 	   /**
       
    93 		* name of the process to be launched 
       
    94 		*/
       
    95 		HBufC16* iProcessName;
       
    96 	};
       
    97 
       
    98 #endif  // __CPROCESSLAUNCHER_H__
       
    99 
       
   100 // End of File