resourcemgmt/hwresourcesmgr/server/plugininc/HWRMTargetModifierPlugin.inl
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #include <ecom/ecom.h>
       
    22 
       
    23 // -----------------------------------------------------------------------------
       
    24 // CHWRMTargetModifierPlugin::~CHWRMTargetModifierPlugin
       
    25 // Destructor informs ECom that implementation has been destroyed.
       
    26 // -----------------------------------------------------------------------------
       
    27 //
       
    28 inline CHWRMTargetModifierPlugin::~CHWRMTargetModifierPlugin()
       
    29     {
       
    30     REComSession::DestroyedImplementation(iDestructorIDKey);
       
    31     }
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CHWRMTargetModifierPlugin::NewL
       
    35 // Factory method to create implementation. Implementation is found via ECom.
       
    36 // -----------------------------------------------------------------------------
       
    37 //
       
    38 inline CHWRMTargetModifierPlugin* CHWRMTargetModifierPlugin::NewL(const TDesC8& aMatch)
       
    39     {
       
    40     // Set resolve parameters to find correct implementation
       
    41     TEComResolverParams resolverParams;
       
    42     resolverParams.SetDataType(aMatch);
       
    43     resolverParams.SetWildcardMatch(EFalse);
       
    44 
       
    45     TAny* interface = REComSession::CreateImplementationL(KHWRMTargetModifierPluginInterfaceUid, 
       
    46                                         _FOFF(CHWRMTargetModifierPlugin, iDestructorIDKey),
       
    47                                         resolverParams,
       
    48                                         KRomOnlyResolverUid);
       
    49 
       
    50     CHWRMTargetModifierPlugin* service = reinterpret_cast<CHWRMTargetModifierPlugin*>(interface);
       
    51     
       
    52     return service;
       
    53     }
       
    54             
       
    55 // End of File