|
1 /* |
|
2 * Copyright (c) 2007 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: CMnCoordinateConverterBase class implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <ecom/ecom.h> |
|
21 #include <mnpluginuids.hrh> |
|
22 #include "mncoordinateconverterbase.h" |
|
23 |
|
24 // ========================== LOCAL FUNCTIONS ================================ |
|
25 |
|
26 // ========================== MEMBER FUNCTIONS =============================== |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 EXPORT_C CMnCoordinateConverterBase::CMnCoordinateConverterBase() |
|
32 { |
|
33 } |
|
34 |
|
35 // --------------------------------------------------------------------------- |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 CMnCoordinateConverterBase* CMnCoordinateConverterBase::NewL( TUid aProviderUid ) |
|
39 { |
|
40 TInt32 offset = static_cast<TInt32> (_FOFF( CMnCoordinateConverterBase, iDtorIdKey )); |
|
41 |
|
42 const TInt KNumUidHexDigits = 8; |
|
43 TBuf8<KNumUidHexDigits> uidText8; |
|
44 |
|
45 _LIT8( KUidHexText, "%08X" ); |
|
46 uidText8.Format( KUidHexText, aProviderUid.iUid ); |
|
47 |
|
48 TEComResolverParams resolverParams; |
|
49 resolverParams.SetDataType( uidText8 ); |
|
50 |
|
51 TAny* ptr = REComSession::CreateImplementationL( |
|
52 TUid::Uid( KMnMapImageConverterIf ), offset, resolverParams ); |
|
53 |
|
54 return reinterpret_cast<CMnCoordinateConverterBase*>( ptr ); |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 EXPORT_C CMnCoordinateConverterBase::~CMnCoordinateConverterBase() |
|
61 { |
|
62 REComSession::DestroyedImplementation( iDtorIdKey ); |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------------------------- |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 EXPORT_C const TMnMapImageParams& CMnCoordinateConverterBase::MapImageParams() const |
|
69 { |
|
70 return iImageParams; |
|
71 } |
|
72 |
|
73 // --------------------------------------------------------------------------- |
|
74 // --------------------------------------------------------------------------- |
|
75 // |
|
76 void CMnCoordinateConverterBase::SetMapImageParams( const TMnMapImageParams& aImageParams ) |
|
77 { |
|
78 iImageParams = aImageParams; |
|
79 } |