uiservicetab/vimpstui/src/cvimpstuiextensionservice.cpp
branchRCL_3
changeset 14 9fdee5e1da30
parent 0 5e5d6b214f4f
equal deleted inserted replaced
13:796276a1bdcc 14:9fdee5e1da30
    44 #include <vimpstui.mbg>
    44 #include <vimpstui.mbg>
    45 #include <vimpst_servicetab_default.mbg>
    45 #include <vimpst_servicetab_default.mbg>
    46 #include <vimpstuires.rsg>
    46 #include <vimpstuires.rsg>
    47 #include <eikenv.h>
    47 #include <eikenv.h>
    48 #include "cvimpstuimenuextension.h"
    48 #include "cvimpstuimenuextension.h"
       
    49 #include "uiservicetabtracer.h"
    49 
    50 
    50 const TInt KDefaultIconId = EMbmVimpstuiExample_msn_tab;
    51 const TInt KDefaultIconId = EMbmVimpstuiExample_msn_tab;
    51 const TInt KDefaultMaskId = EMbmVimpstuiExample_msn_tab_mask;
    52 const TInt KDefaultMaskId = EMbmVimpstuiExample_msn_tab_mask;
    52 
    53 
    53 const TInt KBrandTabIconId = EMbmVimpst_servicetab_defaultQgn_prop_im_imsg ;
    54 const TInt KBrandTabIconId = EMbmVimpst_servicetab_defaultQgn_prop_im_imsg ;
    85 // ---------------------------------------------------------------------------
    86 // ---------------------------------------------------------------------------
    86 // CVIMPSTUIExtensionService::ConstructL
    87 // CVIMPSTUIExtensionService::ConstructL
    87 // ---------------------------------------------------------------------------
    88 // ---------------------------------------------------------------------------
    88 // 
    89 // 
    89 void CVIMPSTUIExtensionService::ConstructL(const TDesC& aServiceName)
    90 void CVIMPSTUIExtensionService::ConstructL(const TDesC& aServiceName)
    90     {       
    91     {      
       
    92 	TRACER_AUTO;
    91     TFileName path;    
    93     TFileName path;    
    92     Dll::FileName(path); //get the location of the dll
    94     Dll::FileName(path); //get the location of the dll
    93     
    95     
    94     TDriveName drive( TParsePtrC( path ).Drive( ) ); // solve drive
    96     TDriveName drive( TParsePtrC( path ).Drive( ) ); // solve drive
    95     TBuf<KMaxResourcePathLength> serviceName(iEngine.ServiceName());
    97     TBuf<KMaxResourcePathLength> serviceName(iEngine.ServiceName());
   234         CPbk2UIExtensionView& aView,
   236         CPbk2UIExtensionView& aView,
   235         TInt aTabbedViewId,
   237         TInt aTabbedViewId,
   236         TUid aId,
   238         TUid aId,
   237         MVIMPSTEngine& aEngine ) 
   239         MVIMPSTEngine& aEngine ) 
   238     {
   240     {
       
   241 	TRACER_AUTO;
   239     if ( !iTabbedView )
   242     if ( !iTabbedView )
   240         {
   243         {
   241         iTabbedView = CVIMPSTUiTabbedView::NewL( 
   244         iTabbedView = CVIMPSTUiTabbedView::NewL( 
   242             aMapper,
   245             aMapper,
   243             aContactManager,
   246             aContactManager,
   263         MxSPContactManager& aContactManager, 
   266         MxSPContactManager& aContactManager, 
   264         CPbk2UIExtensionView& aView,
   267         CPbk2UIExtensionView& aView,
   265         TInt aBlockedViewId,
   268         TInt aBlockedViewId,
   266         MVIMPSTEngine& aEngine ) 
   269         MVIMPSTEngine& aEngine ) 
   267     {
   270     {
       
   271 	TRACER_AUTO;
   268     if ( !iBlockedView )
   272     if ( !iBlockedView )
   269         {
   273         {
   270         iBlockedView = CVIMPSTUiBlockView::NewL( 
   274         iBlockedView = CVIMPSTUiBlockView::NewL( 
   271             aMapper,
   275             aMapper,
   272             aContactManager,
   276             aContactManager,
   290         CPbk2UIExtensionView& aView,
   294         CPbk2UIExtensionView& aView,
   291         TInt aSearchViewId,
   295         TInt aSearchViewId,
   292         TUid aId,
   296         TUid aId,
   293         MVIMPSTEngine& aEngine )
   297         MVIMPSTEngine& aEngine )
   294     {
   298     {
       
   299 	TRACER_AUTO;
   295     if ( !iSearchView )
   300     if ( !iSearchView )
   296         {
   301         {
   297         iSearchView = CVIMPSTUiSearchView::NewL( 
   302         iSearchView = CVIMPSTUiSearchView::NewL( 
   298             aMapper,
   303             aMapper,
   299             aContactManager,
   304             aContactManager,
   431 // CVIMPSTUIExtensionService::SetSearchFieldsDataL
   436 // CVIMPSTUIExtensionService::SetSearchFieldsDataL
   432 // ---------------------------------------------------------------------------
   437 // ---------------------------------------------------------------------------
   433 // 
   438 // 
   434 void CVIMPSTUIExtensionService::SetSearchFieldsDataL( RArray<TInt>& aEnumKeysArray, RPointerArray<HBufC>& aLebelKeysArray )
   439 void CVIMPSTUIExtensionService::SetSearchFieldsDataL( RArray<TInt>& aEnumKeysArray, RPointerArray<HBufC>& aLebelKeysArray )
   435     {
   440     {
       
   441 	TRACER_AUTO;
   436     // reset all old fields and create new fields
   442     // reset all old fields and create new fields
   437     if( iUiFieldsArray )
   443     if( iUiFieldsArray )
   438 	    {
   444 	    {
   439 	    delete iUiFieldsArray;
   445 	    delete iUiFieldsArray;
   440 	   	iUiFieldsArray = NULL;	
   446 	   	iUiFieldsArray = NULL;	
   507 // CVIMPSTUIExtensionService::GetSearchKeyLabelL
   513 // CVIMPSTUIExtensionService::GetSearchKeyLabelL
   508 // ---------------------------------------------------------------------------
   514 // ---------------------------------------------------------------------------
   509 // 
   515 // 
   510 HBufC* CVIMPSTUIExtensionService::GetSearchKeyLabelL(TVIMPSTEnums::TVIMPSTSearchKey aSearchKey ,TBool& aBasicField )  
   516 HBufC* CVIMPSTUIExtensionService::GetSearchKeyLabelL(TVIMPSTEnums::TVIMPSTSearchKey aSearchKey ,TBool& aBasicField )  
   511     {
   517     {
   512 
   518 	TRACER_AUTO;
   513     HBufC* keyText = NULL;
   519     HBufC* keyText = NULL;
   514     aBasicField = EFalse;
   520     aBasicField = EFalse;
   515     
   521     
   516     switch( aSearchKey )
   522     switch( aSearchKey )
   517 	    {
   523 	    {
   596 // CVIMPSTUIExtensionService::SortBasicFields
   602 // CVIMPSTUIExtensionService::SortBasicFields
   597 // ---------------------------------------------------------------------------
   603 // ---------------------------------------------------------------------------
   598 // 
   604 // 
   599 void CVIMPSTUIExtensionService::SortBasicFields()  
   605 void CVIMPSTUIExtensionService::SortBasicFields()  
   600 	{
   606 	{
       
   607 	TRACER_AUTO;
   601 	TInt count = iUiFieldsArray->Count();
   608 	TInt count = iUiFieldsArray->Count();
   602 	TInt index = 0;
   609 	TInt index = 0;
   603 	if( count >2 ) // atleast there has to be 3 item for sort , first name is already on top
   610 	if( count >2 ) // atleast there has to be 3 item for sort , first name is already on top
   604 		{
   611 		{
   605 		MVIMPSTUiSearchField& field = iUiFieldsArray->At(1);
   612 		MVIMPSTUiSearchField& field = iUiFieldsArray->At(1);