gssettingsuis/Gs/gslauncher/inc/GSLauncher.h
changeset 68 13e71d907dc3
parent 0 8c5d936e5675
equal deleted inserted replaced
40:6465d5bb863a 68:13e71d907dc3
       
     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:  Launches GS views.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_GSLAUNCHER_H
       
    21 #define C_GSLAUNCHER_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <e32def.h>
       
    25 #include <apgtask.h>
       
    26 
       
    27 
       
    28 
       
    29 class CGSLauncherExtension;
       
    30 /**
       
    31  *  Launches general settings with specific plug-in opened.
       
    32  *  Using this API, a client may request a general settings view to be shown.
       
    33  *  Implementation will launch general settings if it is not yet running. 
       
    34  *
       
    35  *  Example usage of the interface:
       
    36  *  @code
       
    37  *   CGSLauncher* l = CGSLauncher::NewLC();
       
    38  *   l->LaunchGSViewL ( yourPluginUid, TUid::Uid(0), KNullDesC8 ); 
       
    39  *   CleanupStack::PopAndDestroy(l);
       
    40  *  @endcode
       
    41  *
       
    42  *  @lib gslauncher.lib
       
    43  *  @since S60 5.0
       
    44  */
       
    45 NONSHARABLE_CLASS(CGSLauncher) : public CBase
       
    46     {
       
    47 
       
    48 public:
       
    49 
       
    50     /**
       
    51      * Two-phased constructors.
       
    52      */
       
    53     IMPORT_C static CGSLauncher* NewL();
       
    54 
       
    55     IMPORT_C static CGSLauncher* NewLC();
       
    56     
       
    57 
       
    58     /**
       
    59     * Destructor.
       
    60     */
       
    61     virtual ~CGSLauncher();
       
    62 
       
    63     /**
       
    64      * Launches general settings with specific plug-in activated.
       
    65      * Launching of plug-in's local views is not supported directly. 
       
    66      * Custom message to can be used to achieve this.
       
    67      * General settings application is started if it's not running. 
       
    68      * Any application embedded into general settings will be closed.
       
    69      *
       
    70      * Needs capability: SwEvent
       
    71      * 
       
    72      * @since S60 5.0
       
    73      * @param aTarget 					Target plug-in as identified in ecom registration
       
    74      *													resource ("implementation_uid").
       
    75      * @param aCustomMessageId  For client data. Passed to the plug-in.
       
    76      * @param aCustomMessage  	For client data. Passed to the plug-in.
       
    77      * @return none
       
    78      */
       
    79 	IMPORT_C void LaunchGSViewL( const TUid aTarget,const TUid aCustomMessageId
       
    80 			,const TDesC8& aCustomMessage );
       
    81 
       
    82 
       
    83 protected:
       
    84 
       
    85 private:
       
    86 
       
    87     CGSLauncher();
       
    88     
       
    89     void ConstructL();
       
    90 
       
    91 private: // data
       
    92 		CGSLauncherExtension* iExt;
       
    93     };
       
    94 
       
    95 #endif // C_GSLAUNCHER_H