phonebookui/Phonebook2/MMCExtension/src/CPmuUIExtensionPlugin.cpp
changeset 0 e686773b3f54
child 21 9da50d567e3c
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Phonebook 2 MMC UI extension plug-in.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "CPmuUIExtensionPlugin.h"
       
    21 
       
    22 // Phonebook 2
       
    23 #include "CPmuCopyToMmcCmd.h"
       
    24 #include "CPmuCopyFromMmcCmd.h"
       
    25 #include "PmuCommands.hrh"
       
    26 #include <CPbk2AppUiBase.h>
       
    27 #include <Pbk2Commands.hrh>
       
    28 #include <MPbk2ContactUiControl.h>
       
    29 #include <CPbk2AppViewBase.h>
       
    30 #include <Pbk2Commands.rsg>
       
    31 #include <Pbk2MmcUIRes.rsg>
       
    32 
       
    33 // System includes
       
    34 #include <coemain.h>
       
    35 #include <eikmenub.h>
       
    36 
       
    37 // --------------------------------------------------------------------------
       
    38 // CPmuUIExtensionPlugin::CPmuUIExtensionPlugin
       
    39 // --------------------------------------------------------------------------
       
    40 //
       
    41 CPmuUIExtensionPlugin::CPmuUIExtensionPlugin()
       
    42     {
       
    43     }
       
    44 
       
    45 // --------------------------------------------------------------------------
       
    46 // CPmuUIExtensionPlugin::~CPmuUIExtensionPlugin
       
    47 // --------------------------------------------------------------------------
       
    48 //
       
    49 CPmuUIExtensionPlugin::~CPmuUIExtensionPlugin()
       
    50     {
       
    51     }
       
    52 
       
    53 // --------------------------------------------------------------------------
       
    54 // CPmuUIExtensionPlugin::NewL
       
    55 // --------------------------------------------------------------------------
       
    56 //
       
    57 CPmuUIExtensionPlugin* CPmuUIExtensionPlugin::NewL()
       
    58     {
       
    59     CPmuUIExtensionPlugin* self = new ( ELeave ) CPmuUIExtensionPlugin();
       
    60     return self;
       
    61     }
       
    62 
       
    63 // --------------------------------------------------------------------------
       
    64 // CPmuUIExtensionPlugin::CreateExtensionViewL
       
    65 // --------------------------------------------------------------------------
       
    66 //
       
    67 MPbk2UIExtensionView* CPmuUIExtensionPlugin::CreateExtensionViewL
       
    68         ( TUid /*aViewId*/, CPbk2UIExtensionView& /*aView*/ )
       
    69     {
       
    70     return NULL;
       
    71     }
       
    72 
       
    73 // --------------------------------------------------------------------------
       
    74 // CPmuUIExtensionPlugin::DynInitMenuPaneL
       
    75 // --------------------------------------------------------------------------
       
    76 //
       
    77 void CPmuUIExtensionPlugin::DynInitMenuPaneL( TInt aResourceId,
       
    78         CEikMenuPane* aMenuPane, MPbk2ContactUiControl& aControl )
       
    79     {
       
    80     switch (aResourceId)
       
    81         {
       
    82         case R_PMU_CASCADING_COPY_CONTACT_CARD_MENU :
       
    83             {
       
    84             TBool marked = aControl.ContactsMarked();
       
    85             if ( !marked)  
       
    86                 {
       
    87 				//Not displayed if no marked items in the Names List.                
       
    88                 TInt pos;
       
    89                 if ( aMenuPane->MenuItemExists( EPmuCmdExportToMemoryCard, pos ) )
       
    90                 	{
       
    91                 	aMenuPane->SetItemDimmed( EPmuCmdExportToMemoryCard, ETrue );
       
    92                 	}
       
    93                 }
       
    94             break;
       
    95             }
       
    96             
       
    97         default:
       
    98             {
       
    99             // Do nothing
       
   100             break;
       
   101             }
       
   102         }
       
   103     }
       
   104 
       
   105 // --------------------------------------------------------------------------
       
   106 // CPmuUIExtensionPlugin::UpdateStorePropertiesL
       
   107 // --------------------------------------------------------------------------
       
   108 //
       
   109 void CPmuUIExtensionPlugin::UpdateStorePropertiesL
       
   110         ( CPbk2StorePropertyArray& /*aPropertyArray*/ )
       
   111     {
       
   112     // Do nothing
       
   113     }
       
   114 
       
   115 // --------------------------------------------------------------------------
       
   116 // CPmuUIExtensionPlugin::CreatePbk2ContactEditorExtensionL
       
   117 // --------------------------------------------------------------------------
       
   118 //
       
   119 MPbk2ContactEditorExtension*
       
   120     CPmuUIExtensionPlugin::CreatePbk2ContactEditorExtensionL
       
   121         ( CVPbkContactManager& /*aContactManager*/,
       
   122           MVPbkStoreContact& /*aContact*/,
       
   123           MPbk2ContactEditorControl& /*aEditorControl*/ )
       
   124     {
       
   125     return NULL;
       
   126     }
       
   127 
       
   128 // --------------------------------------------------------------------------
       
   129 // CPmuUIExtensionPlugin::CreatePbk2UiControlExtensionL
       
   130 // --------------------------------------------------------------------------
       
   131 //
       
   132 MPbk2ContactUiControlExtension*
       
   133     CPmuUIExtensionPlugin::CreatePbk2UiControlExtensionL
       
   134         ( CVPbkContactManager& /*aContactManager*/ )
       
   135     {
       
   136     return NULL;
       
   137     }
       
   138 
       
   139 // --------------------------------------------------------------------------
       
   140 // CPmuUIExtensionPlugin::CreatePbk2SettingsViewExtensionL
       
   141 // --------------------------------------------------------------------------
       
   142 //
       
   143 MPbk2SettingsViewExtension*
       
   144         CPmuUIExtensionPlugin::CreatePbk2SettingsViewExtensionL
       
   145             ( CVPbkContactManager& /*aContactManager*/ )
       
   146     {
       
   147     return NULL;
       
   148     }
       
   149 
       
   150 // --------------------------------------------------------------------------
       
   151 // CPmuUIExtensionPlugin::CreatePbk2AppUiExtensionL
       
   152 // --------------------------------------------------------------------------
       
   153 //
       
   154 MPbk2AppUiExtension* CPmuUIExtensionPlugin::CreatePbk2AppUiExtensionL
       
   155         ( CVPbkContactManager& /*aContactManager*/ )
       
   156     {
       
   157     return NULL;
       
   158     }
       
   159 
       
   160 // --------------------------------------------------------------------------
       
   161 // CPmuUIExtensionPlugin::CreatePbk2CommandForIdL
       
   162 // --------------------------------------------------------------------------
       
   163 //
       
   164 MPbk2Command* CPmuUIExtensionPlugin::CreatePbk2CommandForIdL
       
   165         ( TInt aCommandId, MPbk2ContactUiControl& aUiControl ) const
       
   166     {
       
   167     MPbk2Command* result = NULL;
       
   168 
       
   169     switch ( aCommandId )
       
   170         {
       
   171         case EPmuCmdExportToMemoryCard:
       
   172             {
       
   173             result = CPmuCopyToMmcCmd::NewL( aUiControl );
       
   174             break;
       
   175             }
       
   176         case EPmuCmdImportFromMemoryCard:
       
   177             {
       
   178             result = CPmuCopyFromMmcCmd::NewL( aUiControl );
       
   179             break;
       
   180             }
       
   181         default:
       
   182             {
       
   183             // Do nothing
       
   184             break;
       
   185             }
       
   186         }
       
   187 
       
   188     return result;
       
   189     }
       
   190 
       
   191 // --------------------------------------------------------------------------
       
   192 // CPmuUIExtensionPlugin::CreatePbk2AiwInterestForIdL
       
   193 // --------------------------------------------------------------------------
       
   194 //
       
   195 MPbk2AiwInterestItem* CPmuUIExtensionPlugin::CreatePbk2AiwInterestForIdL
       
   196         ( TInt /*aInterestId*/,
       
   197           CAiwServiceHandler& /*aServiceHandler*/ ) const
       
   198     {
       
   199     // Do nothing
       
   200     return NULL;
       
   201     }
       
   202 
       
   203 // --------------------------------------------------------------------------
       
   204 // CPmuUIExtensionPlugin::GetHelpContextL
       
   205 // --------------------------------------------------------------------------
       
   206 //
       
   207 TBool CPmuUIExtensionPlugin::GetHelpContextL
       
   208         ( TCoeHelpContext& /*aContext*/, const CPbk2AppViewBase& /*aView*/,
       
   209           MPbk2ContactUiControl& /*aUiControl*/ )
       
   210     {
       
   211     return EFalse;
       
   212     }
       
   213 
       
   214 // --------------------------------------------------------------------------
       
   215 // CPmuUIExtensionPlugin::ApplyDynamicViewGraphChangesL
       
   216 // --------------------------------------------------------------------------
       
   217 //
       
   218 void CPmuUIExtensionPlugin::ApplyDynamicViewGraphChangesL
       
   219         ( CPbk2ViewGraph& /*aViewGraph*/ )
       
   220     {
       
   221     // Do nothing
       
   222     }
       
   223 
       
   224 // --------------------------------------------------------------------------
       
   225 // CPmuUIExtensionPlugin::ApplyDynamicPluginInformationDataL
       
   226 // --------------------------------------------------------------------------
       
   227 //
       
   228 void CPmuUIExtensionPlugin::ApplyDynamicPluginInformationDataL
       
   229         ( CPbk2UIExtensionInformation& /*aUiExtensionInformation*/ )
       
   230     {
       
   231     // Do nothing
       
   232     }
       
   233 
       
   234 // End of File