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: Personality plugins must be inherited from this class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <cusbpersonalityplugin.h> |
|
20 #include <ecom/ecom.h> |
|
21 |
|
22 // ---------------------------------------------------------------------------- |
|
23 // C++ constructor |
|
24 // ---------------------------------------------------------------------------- |
|
25 // |
|
26 EXPORT_C CUsbPersonalityPlugin::CUsbPersonalityPlugin( |
|
27 TUsbPersonalityParams& aPersonalityParams ) |
|
28 : CUsbPersonality( aPersonalityParams ) |
|
29 { |
|
30 } |
|
31 |
|
32 // ---------------------------------------------------------------------------- |
|
33 // Factory function |
|
34 // ---------------------------------------------------------------------------- |
|
35 // |
|
36 EXPORT_C CUsbPersonalityPlugin* CUsbPersonalityPlugin::NewL( |
|
37 TUsbPersonalityParams& aPersonalityParams, TUid aImplementationId ) |
|
38 { |
|
39 return ( reinterpret_cast<CUsbPersonalityPlugin*>( |
|
40 REComSession::CreateImplementationL( aImplementationId, |
|
41 _FOFF(CUsbPersonalityPlugin, iPrivateEComUID), |
|
42 ( TAny* ) &aPersonalityParams ) ) ); |
|
43 } |
|
44 |
|
45 // ---------------------------------------------------------------------------- |
|
46 // Destructor will destroy the implementation |
|
47 // ---------------------------------------------------------------------------- |
|
48 // |
|
49 EXPORT_C CUsbPersonalityPlugin::~CUsbPersonalityPlugin() |
|
50 { |
|
51 REComSession::DestroyedImplementation(iPrivateEComUID); |
|
52 } |
|
53 |
|
54 // End of file |
|