interface/overlay/POIOverlay.inl
changeset 0 c316ab048e9d
equal deleted inserted replaced
-1:000000000000 0:c316ab048e9d
       
     1 /*
       
     2  * Name        : POIOverlay.inl
       
     3  * Description : ECOM interface definition
       
     4  * Project     : This file is part of OpenMAR, an Open Mobile Augmented Reality browser
       
     5  * Website     : http://OpenMAR.org
       
     6  *
       
     7  * Copyright (c) 2010 David Caabeiro
       
     8  *
       
     9  * All rights reserved. This program and the accompanying materials are made available 
       
    10  * under the terms of the Eclipse Public License v1.0 which accompanies this 
       
    11  * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
       
    12  *
       
    13  */
       
    14 
       
    15 inline CPOIOverlay* CPOIOverlay::NewL(const TDesC8& aMatch, SParameter& aParam)
       
    16 {
       
    17     const TUid KCPOIOverlayInterfaceUid = { KOverlayInterfaceUidValue };
       
    18 
       
    19     TEComResolverParams resolverParams;
       
    20     resolverParams.SetDataType(aMatch);
       
    21     resolverParams.SetWildcardMatch(ETrue);
       
    22 
       
    23     TAny* interface = REComSession::CreateImplementationL(KCPOIOverlayInterfaceUid,
       
    24         _FOFF(CPOIOverlay, iDtor_ID_Key), &aParam, resolverParams);
       
    25 
       
    26     return reinterpret_cast <CPOIOverlay*>(interface);
       
    27 }
       
    28 
       
    29 inline CPOIOverlay* CPOIOverlay::NewL(const TUid aImplementationUid, SParameter& aParam)
       
    30 {
       
    31     TAny* interface = REComSession::CreateImplementationL(aImplementationUid, 
       
    32         _FOFF(CPOIOverlay, iDtor_ID_Key), &aParam);
       
    33 
       
    34     return reinterpret_cast <CPOIOverlay*>(interface);
       
    35 }
       
    36 
       
    37 inline CPOIOverlay::~CPOIOverlay()
       
    38 {
       
    39     REComSession::DestroyedImplementation(iDtor_ID_Key);
       
    40 }