textinput/peninputarc/src/peninputlayoutinterface/peninputlayoutinterface.cpp
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Implementation for CFepUiLayoutInterface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "peninputlayoutplugininterface.h"
       
    20 
       
    21 // ======== MEMBER FUNCTIONS ========
       
    22 
       
    23 // ---------------------------------------------------------------------------
       
    24 // CFepUiLayoutInterface::NewL
       
    25 // Factory function
       
    26 // ---------------------------------------------------------------------------
       
    27 //
       
    28 EXPORT_C CFepUiLayoutInterface* CFepUiLayoutInterface::NewL(TInt aInputMethodId)
       
    29     {
       
    30     // Set up the interface find for the default resolver.
       
    31     TUid id;
       
    32     id.iUid = aInputMethodId;
       
    33     TAny* pFunc = REComSession::CreateImplementationL(id, 
       
    34                                                     DestructorUidKeyOffset());
       
    35     return REINTERPRET_CAST(CFepUiLayoutInterface*,pFunc);
       
    36     }
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // CFepUiLayoutInterface::CFepUiLayoutInterface
       
    40 // Default constructor
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 EXPORT_C CFepUiLayoutInterface::CFepUiLayoutInterface()
       
    44     {
       
    45     //do nothing
       
    46     }
       
    47 // ---------------------------------------------------------------------------
       
    48 // CFepUiLayoutInterface::~CFepUiLayoutInterface
       
    49 // Destructor
       
    50 // ---------------------------------------------------------------------------
       
    51 //
       
    52 EXPORT_C CFepUiLayoutInterface::~CFepUiLayoutInterface()
       
    53     {
       
    54     // Destroy any instance variables and then
       
    55     // inform the framework that this specific 
       
    56     // instance of the interface has been destroyed.
       
    57     REComSession::DestroyedImplementation(iDtor_ID_Key);
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------------------------
       
    61 // CFepUiLayoutInterface::SetDestructorKey
       
    62 // Set destructor UID
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 EXPORT_C void CFepUiLayoutInterface::SetDestructorKey(TUid aKey)
       
    66      {
       
    67      iDtor_ID_Key = aKey;
       
    68      }
       
    69 
       
    70 // ---------------------------------------------------------------------------
       
    71 // CFepUiLayoutInterface::DestructorUidKeyOffset
       
    72 // Get destructor Uid key offset
       
    73 // ---------------------------------------------------------------------------
       
    74 //     
       
    75 TInt32 CFepUiLayoutInterface::DestructorUidKeyOffset()
       
    76     {    
       
    77     return _FOFF(CFepUiLayoutInterface,iDtor_ID_Key);
       
    78     }
       
    79     
       
    80  //end of file