|
1 /* |
|
2 * Name : POIProvider.inl |
|
3 * Description : ECOM interface definition |
|
4 * Project : This file is part of OpenMAR, an Open Mobile Augmented Reality browser |
|
5 * Website : http://OpenMAR.org |
|
6 * |
|
7 * Copyright (c) 2010 David Caabeiro |
|
8 * |
|
9 * All rights reserved. This program and the accompanying materials are made available |
|
10 * under the terms of the Eclipse Public License v1.0 which accompanies this |
|
11 * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html |
|
12 * |
|
13 */ |
|
14 |
|
15 inline CPOIProvider* CPOIProvider::NewL(const TDesC8& aMatch, const TDesC8& aProviderUri) |
|
16 { |
|
17 const TUid KCPOIProviderInterfaceUid = { KProviderInterfaceUidValue }; |
|
18 |
|
19 TDesC8& param = const_cast<TDesC8&>(aProviderUri); |
|
20 |
|
21 TEComResolverParams resolverParams; |
|
22 resolverParams.SetDataType(aMatch); |
|
23 resolverParams.SetWildcardMatch(ETrue); |
|
24 |
|
25 TAny* interface = REComSession::CreateImplementationL(KCPOIProviderInterfaceUid, |
|
26 _FOFF(CPOIProvider, iDtor_ID_Key), ¶m, resolverParams); |
|
27 |
|
28 return reinterpret_cast <CPOIProvider*>(interface); |
|
29 } |
|
30 |
|
31 inline CPOIProvider* CPOIProvider::NewL(const TUid aImplementationUid, const TDesC8& aProviderUri) |
|
32 { |
|
33 TDesC8& param = const_cast<TDesC8&>(aProviderUri); |
|
34 |
|
35 TAny* interface = REComSession::CreateImplementationL(aImplementationUid, |
|
36 _FOFF(CPOIProvider, iDtor_ID_Key), ¶m); |
|
37 |
|
38 return reinterpret_cast <CPOIProvider*>(interface); |
|
39 } |
|
40 |
|
41 inline CPOIProvider::~CPOIProvider() |
|
42 { |
|
43 REComSession::DestroyedImplementation(iDtor_ID_Key); |
|
44 } |
|
45 |
|
46 inline void CPOIProvider::SetObserver(MPOIProviderObserver* aObserver) |
|
47 { |
|
48 iObserver = aObserver; |
|
49 } |