emailcontacts/contactactionmenu/inc/cfsccontactactionmenu.inl
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     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 class CFscContactActionMenu.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <ecom/ecom.h>
       
    21 
       
    22 //<cmail>
       
    23 #include "fsccontactactionmenuuids.hrh"
       
    24 #include "tfsccontactactionmenuconstructparameters.h"
       
    25 //</cmail>
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // Two-phased constructor.
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 inline CFscContactActionMenu* CFscContactActionMenu::NewL(
       
    32     CFscContactActionService& aService,
       
    33     TFscContactActionMenuMode aMode,
       
    34     TBool aOpenedFromMR )
       
    35     {
       
    36     TUid implUid = { KFscContactActionMenuImplImpUid };
       
    37     
       
    38     TFscContactActionMenuConstructParameters params( aService, aMode );
       
    39     TAny* paramsPtr = reinterpret_cast< TAny* >( &params );
       
    40 
       
    41     TAny* interface = REComSession::CreateImplementationL(
       
    42         implUid, _FOFF( CFscContactActionMenu, iDtor_ID_Key ), paramsPtr );
       
    43 
       
    44     CFscContactActionMenu* contactActionMenu = 
       
    45         reinterpret_cast< CFscContactActionMenu* >( interface );
       
    46 
       
    47     if ( contactActionMenu )
       
    48         {
       
    49         contactActionMenu->SetOpenedFromMR( aOpenedFromMR );
       
    50         }
       
    51         
       
    52     return contactActionMenu;
       
    53     }
       
    54     
       
    55 // ---------------------------------------------------------------------------
       
    56 // Destructor.
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 inline CFscContactActionMenu::~CFscContactActionMenu()
       
    60     {
       
    61     REComSession::DestroyedImplementation( iDtor_ID_Key );
       
    62     }