classicui_plat/personalisation_plugin_api/inc/PslnFWPluginInterfaceNoBaseView.h
changeset 37 89c890c70182
parent 34 6b5204869ed5
child 45 667edd0b8678
equal deleted inserted replaced
34:6b5204869ed5 37:89c890c70182
     1 /*
       
     2 * Copyright (c) 2006 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:  Defines interface for application skinning framework's ECOM
       
    15 *                plugin.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef C_PSLNFWPLUGININTERFACENOBASEVIEW_H
       
    21 #ifndef C_PSLNFWPLUGININTERFACE_H
       
    22 
       
    23 #define C_PSLNFWPLUGININTERFACENOBASEVIEW_H
       
    24 
       
    25 #include <gulicon.h>
       
    26 #include <AknsUtils.h>
       
    27 #include <AknViewAppUi.h>
       
    28 #include <data_caging_path_literals.hrh>
       
    29 
       
    30 // Constants used in ECOM implementation
       
    31 const TUid KPslnFWPluginInterfaceUid    = { 0x102750A9 };
       
    32 
       
    33 /**
       
    34 * Interface class for Psln plugin. All Psln plugins that inherit CBase from 
       
    35 * other means will implement this class. This is alternative to 
       
    36 * PslnFwPluginInterface. The only difference is that there is no CBase-inheritance
       
    37 * in this class. 
       
    38 * 
       
    39 * Note that classes implementing this interface NEED to inherit
       
    40 * CAknView by some other means. 
       
    41 *
       
    42 * Also note that class cannot implement both this and PslnFwPluginInterface (as
       
    43 * defined in the PslnPluginInterface.h).
       
    44 *
       
    45 * For details how to implement a Psln ECOM view, 
       
    46 * see header file PslnFwPluginInterface.h.
       
    47 *
       
    48 * @lib PslnFramework.lib
       
    49 * @since S60 v3.1
       
    50 */
       
    51 class CPslnFWPluginInterface: public CBase
       
    52     {
       
    53 public:
       
    54 
       
    55     /**
       
    56     * Specifies the location of the plugin in the Personalization application.
       
    57     * By default the plugins are appended to the end of the main view.
       
    58     */
       
    59     enum TPslnFWLocationType
       
    60         {
       
    61         // Personalization application decides plugins location (recommended)
       
    62         EPslnFWNotSpecified = 0,
       
    63         // Location is specified in aIndex parameter. Note that if the location 
       
    64         // is already taken by some other plugin (or static view), then plugin
       
    65         // view is appended to the end, just like it had EPslnFWNotSpecified set.
       
    66         EPslnFWSpecified
       
    67         };
       
    68 
       
    69     /**
       
    70     * Creates new Psln plugin having the given UID.
       
    71     * Uses Leave code KErrNotFound if implementation is not found.
       
    72     *
       
    73     * @param aImplementationUid Implementation UID of the plugin to be
       
    74     *        created.
       
    75     * @param aAppUi Pointer to the Psln application UI that can be used to
       
    76     *               switch to another view.
       
    77     */
       
    78     static CPslnFWPluginInterface* NewL(
       
    79         const TUid aImplementationUid,
       
    80         CAknViewAppUi* aAppUi );
       
    81 
       
    82     /**
       
    83     * Destructor
       
    84     */
       
    85     inline ~CPslnFWPluginInterface();
       
    86 
       
    87     /**
       
    88     * Method for getting caption of this plugin. This should be the
       
    89     * localized name of the plugin view to be shown in main view.
       
    90     *
       
    91     * @param aCaption pointer to Caption variable
       
    92     */
       
    93     virtual void GetCaptionL( TDes& aCaption ) const = 0;
       
    94 
       
    95     /**
       
    96     * Method for getting tab text for this plugin. This should be the
       
    97     * localized name of the plugin view to be shown in tab group.
       
    98     *
       
    99     * @param aCaption pointer to Caption variable
       
   100     */
       
   101     virtual void GetTabTextL( TDes& aCaption ) const = 0;
       
   102 
       
   103     /**
       
   104     * Creates a new icon. This icon is shown in Personalization app's main view. 
       
   105     * Ownership of the created icon is transferred to the caller.
       
   106     *
       
   107     * @return Pointer of the icon. 
       
   108     * NOTE: Ownership of this icon is transferred to the caller.
       
   109     */
       
   110     virtual CGulIcon* CreateIconL() = 0;
       
   111 
       
   112     /**
       
   113     * Method for getting the plugin view's location within Psln application.
       
   114     * Do not override, unless plugin view should be in certain location.
       
   115     * By default the plugins are appended to the end of the main view.
       
   116     * @param aType type of location: specified / not specified
       
   117     * @param aIndex proposed location of plugin.
       
   118     */
       
   119     virtual inline void GetLocationTypeAndIndex( 
       
   120         TPslnFWLocationType& aType, 
       
   121         TInt& aIndex ) const;
       
   122 
       
   123     /**
       
   124     * Reserved for future use/plugin's custom functionality. This can be
       
   125     * overwritten if plugin needs to have custom functionality which cannot
       
   126     * be fulfilled otherwise.
       
   127     */
       
   128     virtual inline TAny* CustomOperationL( TAny* aParam1, TAny* aParam2 );
       
   129 
       
   130 protected: // data
       
   131 
       
   132     /**
       
   133     * Pointer to application UI. This is protected, so that classes 
       
   134     * implementing the interface inherit pointer to AppUi.
       
   135     * Not own.
       
   136     */
       
   137     CAknViewAppUi* iAppUi;
       
   138 
       
   139 
       
   140 private: // data
       
   141 
       
   142     /**
       
   143      * ECOM plugin instance UID.
       
   144      */
       
   145      TUid iDtor_ID_Key;
       
   146 
       
   147     };
       
   148 
       
   149 #include "PslnFWPluginInterface.inl"
       
   150 
       
   151 #endif // C_PSLNFWPLUGININTERFACE_H
       
   152 #endif // C_PSLNFWPLUGININTERFACENOBASEVIEW_H
       
   153 
       
   154 //End of file