|
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: IM Features interface used by XIMP IM clients. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <ecom/ecom.h> |
|
19 |
|
20 |
|
21 // ----------------------------------------------------------------------------- |
|
22 // MProtocolImFeatures::NewL() implementation |
|
23 // Factory method to instantiate the platform default |
|
24 // MProtocolImFeatures implementation through the ECom framework. |
|
25 // ----------------------------------------------------------------------------- |
|
26 // |
|
27 inline MProtocolImFeatures* MProtocolImFeatures::NewL() |
|
28 { |
|
29 _LIT8( KXIMPIMDefaultData, "2219" ); |
|
30 |
|
31 TEComResolverParams resolvingParams; |
|
32 resolvingParams.SetDataType( KXIMPIMDefaultData ); |
|
33 resolvingParams.SetWildcardMatch( ETrue ); |
|
34 TAny* imp = REComSession::CreateImplementationL( |
|
35 TUid::Uid( MProtocolImFeatures::KInterfaceId), |
|
36 _FOFF( MProtocolImFeatures, iEcomDtorID ), resolvingParams ); |
|
37 |
|
38 return reinterpret_cast< MProtocolImFeatures* >( imp ); |
|
39 } |
|
40 |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // MProtocolImFeatures::NewL() implementation |
|
44 // Factory method to instantiate the user specific implementation for |
|
45 // MProtocolImFeatures API through the ECom framework. |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 inline MProtocolImFeatures* MProtocolImFeatures::NewL( TUid aImplementationUid, |
|
49 TAny* aInitParams ) |
|
50 { |
|
51 MProtocolImFeatures* ptr = reinterpret_cast<MProtocolImFeatures*>( |
|
52 REComSession::CreateImplementationL( |
|
53 aImplementationUid, |
|
54 _FOFF( MProtocolImFeatures, iEcomDtorID ), |
|
55 aInitParams ) ); |
|
56 |
|
57 return ptr; |
|
58 } |
|
59 |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // MProtocolImFeatures::MProtocolImFeatures() implementation |
|
63 // Zero initializes the iEcomDtorID member. |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 inline MProtocolImFeatures::MProtocolImFeatures() |
|
67 { |
|
68 iEcomDtorID = TUid::Null(); |
|
69 } |
|
70 |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // MProtocolImFeatures::~MProtocolImFeatures() |
|
74 // Destructor notifies the ECom from implementation destruction. |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 inline MProtocolImFeatures::~MProtocolImFeatures() |
|
78 { |
|
79 REComSession::DestroyedImplementation( iEcomDtorID ); |
|
80 } |
|
81 |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // MProtocolImGroup& MProtocolImFeatures::ImGroup() |
|
85 // Dummy Implementation |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 inline MProtocolImGroup& MProtocolImFeatures::ImGroup() |
|
89 { |
|
90 MProtocolImGroup* dummyGroup = NULL; |
|
91 return *dummyGroup; |
|
92 } |
|
93 |
|
94 // ----------------------------------------------------------------------------- |
|
95 // MProtocolImInvitation& MProtocolImFeatures::ImInvitation() |
|
96 // Dummy Implementation |
|
97 // ----------------------------------------------------------------------------- |
|
98 // |
|
99 inline MProtocolImInvitation& MProtocolImFeatures::ImInvitation() |
|
100 { |
|
101 MProtocolImInvitation* dummyInvitation = NULL; |
|
102 return *dummyInvitation; |
|
103 } |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // MProtocolImSearch& MProtocolImFeatures::ImSearch() |
|
107 // Dummy Implementation |
|
108 // ----------------------------------------------------------------------------- |
|
109 // |
|
110 inline MProtocolImSearch& MProtocolImFeatures::ImSearch() |
|
111 { |
|
112 MProtocolImSearch* dummySearch = NULL; |
|
113 return *dummySearch; |
|
114 } |
|
115 |