mmappfw_plat/mpx_base_view_plugins_api/inc/mpxviewplugin.h
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     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:  MPX view plugin definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CMPXVIEWPLUGIN_H
       
    21 #define CMPXVIEWPLUGIN_H
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include <ecom/ecom.h>
       
    26 
       
    27 
       
    28 // CLASS DECLARATION
       
    29 class MMPXCustomCommandObserver;
       
    30 
       
    31 /**
       
    32  *  MPX view plugin definition.
       
    33  *
       
    34  *  @lib mpxviewplugin.lib
       
    35  */
       
    36 class CMPXViewPlugin : public CBase
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      *
       
    43      * @since S60 3.0
       
    44      * @param aUid Implementation Uid.
       
    45      * @param aCommandObserver Observer to handle commands.
       
    46      * @return Pointer to newly created object.
       
    47      */
       
    48     IMPORT_C static CMPXViewPlugin* NewL( 
       
    49         const TUid& aUid,
       
    50         MMPXCustomCommandObserver* aCommandObserver );
       
    51 
       
    52     /**
       
    53      * Destructor.
       
    54      *
       
    55      * @since S60 3.0
       
    56      */
       
    57     IMPORT_C virtual ~CMPXViewPlugin();
       
    58 
       
    59     /**
       
    60      * Interface method to create view.
       
    61      *
       
    62      * @since S60 3.0
       
    63      */
       
    64     virtual void CreateViewL() = 0;
       
    65 
       
    66     /**
       
    67      * Interface method to destroy view.
       
    68      *
       
    69      * @since S60 3.0
       
    70      */
       
    71     virtual void DestroyView() = 0;
       
    72 
       
    73     /**
       
    74      * Interface method to activate view.
       
    75      *
       
    76      * @since S60 3.0
       
    77      * @param aParam Parameter required to activate the view.
       
    78      */
       
    79     virtual void ActivateViewL( const TDesC* aParam = NULL ) = 0;
       
    80     
       
    81     /**
       
    82      * Interface method to activate as default view. 
       
    83      * Will not bring to foreground.
       
    84      *
       
    85      * @since S60 3.0
       
    86      */
       
    87     virtual void SetAsDefaultViewL() = 0;
       
    88 
       
    89     /**
       
    90      * Interface method to deactivate view.
       
    91      *
       
    92      * @since S60 3.0
       
    93      */
       
    94     virtual void DeactivateView() = 0;
       
    95     
       
    96 protected:
       
    97     /**
       
    98      * Sets observer for custom commands.
       
    99      *
       
   100      * @since S60 3.0
       
   101      * @param aCommandObserver Observer to handle commands.
       
   102      */
       
   103     IMPORT_C virtual void SetObserver( 
       
   104         MMPXCustomCommandObserver* aCommandObserver );
       
   105     
       
   106 protected: // Data
       
   107 
       
   108     MMPXCustomCommandObserver* iCommandObserver; // not owned    
       
   109 
       
   110 private:    // Data
       
   111 
       
   112     // identifies the actual plugin instance
       
   113     TUid iDtorKey;
       
   114     };
       
   115 
       
   116 #endif  // CMPXVIEWPLUGIN_H
       
   117 
       
   118 // End of File