uiservicetab/vimpstdetailsviewplugin/inc/cvimpstdetailsviewmenuhandler.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 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:  Implementation of detailsview plugin menu handler
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVIMPSTDETAILSVIEWMENUHANDLER_H
       
    20 #define CVIMPSTDETAILSVIEWMENUHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <AiwServiceHandler.h>
       
    24 #include "cvimpstdetailscontacthandler.h"
       
    25 
       
    26 class CVIMPSTDetailsViewPlugin;
       
    27 class CAiwServiceHandler;
       
    28 /**
       
    29  *  Class implementing vimpstdetailsviewplugin menu functionality
       
    30  *
       
    31  *  @lib vimpstdetailsviewplugin.dll
       
    32  *  @since S60 v3.2
       
    33  */
       
    34  
       
    35 class CVIMPSTDetailsViewMenuHandler : public CBase, public MAiwNotifyCallback
       
    36 	{
       
    37 
       
    38 	public:
       
    39 
       
    40 	    /**
       
    41 	     * Two-phased constructor.
       
    42 	     * @param aPlugin, reference to CVIMPSTDetailsViewPlugin class
       
    43 	     * @param aStoreType, store type to indicate wether server contact store or local store
       
    44 	     * @return Pointer to this class
       
    45 	     * @since S60 v5.0
       
    46 	     */
       
    47 	    
       
    48 	    static CVIMPSTDetailsViewMenuHandler* NewL(CVIMPSTDetailsViewPlugin& aPlugin,
       
    49 	                                                TStoreType aStoreType );
       
    50 
       
    51 	    /**
       
    52 	     * Destructor.
       
    53 	     * @since S60 v5.0
       
    54 	     */
       
    55 	    ~CVIMPSTDetailsViewMenuHandler();
       
    56 
       
    57 	public: // from base class CCCAppViewPluginBase
       
    58 
       
    59 	     /**
       
    60 	     * From CCCAppViewPluginBase
       
    61 	     * (see details from header)
       
    62 	     * @param aResourceId, a resource id 
       
    63 	     * @param aMenuPane, reference to menu pane
       
    64 	     * @since S60 v5.0
       
    65 	     */
       
    66 	    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
    67 
       
    68 	     /**
       
    69 	     * From CCCAppViewPluginBase
       
    70 	     * (see details from header)
       
    71 	     * @param aCommand, a command id to handle 
       
    72 	     * @since S60 v5.0
       
    73 	     */
       
    74 	    void HandleCommandL(TInt aCommand);
       
    75 
       
    76 	private:
       
    77 
       
    78 	      
       
    79 	    /**
       
    80 	     * edit the selected field 
       
    81 	     *
       
    82 	     * @since S60 v5.0
       
    83 	     */
       
    84 	    void DoEditCmdL();
       
    85 	        
       
    86 	    /**
       
    87 	     * delete the contact
       
    88 	     *
       
    89 	     * @since S60 v5.0
       
    90 	     */
       
    91 	     
       
    92 	    void DoDeleteCmdL();
       
    93 	    
       
    94 	     /**
       
    95 	     * copy the clip board of selected field
       
    96 	     *
       
    97 	     * @since S60 v5.0
       
    98 	     */
       
    99 	    void DoCopyCmdL();
       
   100 	
       
   101 	    /**
       
   102 	     * Prepares plugin for AIW-menu usage
       
   103 	     *
       
   104 	     * @since S60 v5.0
       
   105 	     */
       
   106 	    void PrepareAiwMenusL();	
       
   107 	   
       
   108 	private: // constructors
       
   109 
       
   110 		/**
       
   111 	     * default constructor
       
   112 	     * @param aPlugin, reference to CVIMPSTDetailsViewPlugin class
       
   113 	     * @param aStoreType, store type to indicate wether server contact store or local store
       
   114 	     * @since S60 v5.0
       
   115 	     */
       
   116 	    CVIMPSTDetailsViewMenuHandler(CVIMPSTDetailsViewPlugin& aPlugin, 
       
   117 	                                   TStoreType aStoreType);
       
   118 
       
   119 		/**
       
   120 	     * provide the two phase construction 
       
   121 	     *
       
   122 	     * @since S60 v5.0
       
   123 	     */
       
   124 	    void ConstructL();
       
   125 
       
   126 	public: // From MAiwNotifyCallback
       
   127 	    
       
   128 	    /**
       
   129 	     * call back method for aiwcommands. MAiwNotifyCallback
       
   130 	     * @param aCmdId, id of the aiwcommand
       
   131 	     * @param aEventId, event id of the aiw command
       
   132 	     * @param EventParamList, callback data is passed 
       
   133 	     * @param aInParamList, aiw command params
       
   134 	     * @since S60 v5.0
       
   135 	     */
       
   136 	    TInt HandleNotifyL(
       
   137 	            TInt aCmdId,
       
   138 	            TInt aEventId,
       
   139 	            CAiwGenericParamList& aEventParamList,
       
   140 	            const CAiwGenericParamList& aInParamList);
       
   141 	private: // data
       
   142 
       
   143 	    /**
       
   144 	     * Not Owns : reference to class handling the view
       
   145 	     */
       
   146 	    CVIMPSTDetailsViewPlugin& iPlugin;
       
   147 
       
   148 	    /**
       
   149 	     * Pointer to AIW service handler
       
   150 	     * Own.
       
   151 	     */
       
   152 	    CAiwServiceHandler* iAiwServiceHandler;
       
   153 	    
       
   154 	    // owns : store type
       
   155 	    TStoreType iStoreType;
       
   156 	  	};
       
   157 
       
   158 	#endif // CVIMPSTDETAILSVIEWMENUHANDLER_H
       
   159 
       
   160 	// End of File