|
1 /* |
|
2 * Copyright (c) 2010 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: This is partial interface implementation which is |
|
15 * used by plugins. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include <ecom/ecom.h> // declares E-com framework classes |
|
24 |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin() |
|
28 // Destroys the plugin implementation |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 inline CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin() |
|
32 { |
|
33 REComSession::DestroyedImplementation( iDtorKey ); |
|
34 } |
|
35 |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CReverseGeoCoderPlugin::NewL() |
|
39 // Creates the instance of CReverseGeoCoderPlugin concrete implementation. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 inline CReverseGeoCoderPlugin* CReverseGeoCoderPlugin::NewL() |
|
43 { |
|
44 RImplInfoPtrArray aImplInfoArray; |
|
45 REComSession::ListImplementationsL(KReversegeocodeInterfaceUid, aImplInfoArray); |
|
46 |
|
47 TInt count = aImplInfoArray.Count(); |
|
48 |
|
49 if(!count) |
|
50 { |
|
51 /* No implementations found for the reverse geocoding functionality */ |
|
52 User::Leave(KErrNotFound); |
|
53 } |
|
54 |
|
55 /* One or more implementations found. Choose the first one */ |
|
56 const CImplementationInformation* plugin = aImplInfoArray[0]; |
|
57 TUid pluginId = plugin->ImplementationUid(); |
|
58 |
|
59 CReverseGeoCoderPlugin* self = reinterpret_cast<CReverseGeoCoderPlugin*>( |
|
60 REComSession::CreateImplementationL( |
|
61 pluginId, _FOFF( CReverseGeoCoderPlugin,iDtorKey ) ) ); |
|
62 |
|
63 return self; |
|
64 } |
|
65 |
|
66 // End of file |