hwrmhaptics/hapticspluginservice/src/hwrmhapticspluginservice.cpp
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     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:  Plugin base API methods implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <hwrmhapticspluginservice.h>
       
    20 
       
    21 // -----------------------------------------------------------------------------
       
    22 // CHWRMHapticsPluginService::~CHWRMHapticsPluginService
       
    23 // Destructor informs ECom that implementation has been destroyed.
       
    24 // -----------------------------------------------------------------------------
       
    25 //
       
    26 EXPORT_C CHWRMHapticsPluginService::~CHWRMHapticsPluginService()
       
    27     {
       
    28     REComSession::DestroyedImplementation( iDestructorIDKey );
       
    29     }
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CHWRMHapticsPluginService::NewL
       
    33 // Factory method to create implementation. Implementation is found via ECom.
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 EXPORT_C CHWRMHapticsPluginService* CHWRMHapticsPluginService::NewL( 
       
    37     TUid aImplementationUid, 
       
    38     MHWRMHapticsPluginCallback* aResponseCallback )
       
    39     {
       
    40     TAny* interface = REComSession::CreateImplementationL( 
       
    41         aImplementationUid, 
       
    42         _FOFF( CHWRMHapticsPluginService, iDestructorIDKey ), 
       
    43         aResponseCallback );
       
    44     
       
    45     CHWRMHapticsPluginService* service =
       
    46          reinterpret_cast<CHWRMHapticsPluginService*>( interface );
       
    47     
       
    48     return service;
       
    49     }
       
    50 
       
    51 // End of File