|
1 /* |
|
2 * Copyright (c) 2008 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: Implementation of CPELogExtensionWrapper class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "cpelogextensionwrapper.h" |
|
20 |
|
21 |
|
22 // ======== MEMBER FUNCTIONS ======== |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // CPELogExtensionWrapper::CPELogExtensionWrapper |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 CPELogExtensionWrapper::CPELogExtensionWrapper( TUid aImplementationUid ) |
|
29 : iPluginUid( aImplementationUid ) |
|
30 { |
|
31 |
|
32 } |
|
33 |
|
34 |
|
35 // --------------------------------------------------------------------------- |
|
36 // CPELogExtensionWrapper::ConstructL |
|
37 // --------------------------------------------------------------------------- |
|
38 // |
|
39 void CPELogExtensionWrapper::ConstructL() |
|
40 { |
|
41 iPlugin = CreateLoggingExtensionL(); |
|
42 } |
|
43 |
|
44 |
|
45 // --------------------------------------------------------------------------- |
|
46 // CPELogExtensionWrapper::NewL |
|
47 // --------------------------------------------------------------------------- |
|
48 // |
|
49 CPELogExtensionWrapper* CPELogExtensionWrapper::NewL( |
|
50 TUid aImplementationUid ) |
|
51 { |
|
52 CPELogExtensionWrapper* self = |
|
53 CPELogExtensionWrapper::NewLC( aImplementationUid ); |
|
54 CleanupStack::Pop( self ); |
|
55 return self; |
|
56 } |
|
57 |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // CPELogExtensionWrapper::NewLC |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 CPELogExtensionWrapper* CPELogExtensionWrapper::NewLC( |
|
64 TUid aImplementationUid ) |
|
65 { |
|
66 CPELogExtensionWrapper* self = |
|
67 new( ELeave ) CPELogExtensionWrapper( aImplementationUid ); |
|
68 CleanupStack::PushL( self ); |
|
69 self->ConstructL(); |
|
70 return self; |
|
71 } |
|
72 |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // CPELogExtensionWrapper::~CPELogExtensionWrapper |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 CPELogExtensionWrapper::~CPELogExtensionWrapper() |
|
79 { |
|
80 delete iPlugin; |
|
81 } |
|
82 |
|
83 |
|
84 // --------------------------------------------------------------------------- |
|
85 // CPELogExtensionWrapper::MatchByUid |
|
86 // --------------------------------------------------------------------------- |
|
87 // |
|
88 TBool CPELogExtensionWrapper::MatchByUid( |
|
89 const TUid* aKey, const CPELogExtensionWrapper& aWrapper ) |
|
90 { |
|
91 if ( aKey ) |
|
92 { |
|
93 return ( aWrapper.Identifier() == *aKey ); |
|
94 } |
|
95 else |
|
96 { |
|
97 return EFalse; |
|
98 } |
|
99 } |
|
100 |
|
101 |
|
102 // --------------------------------------------------------------------------- |
|
103 // From class CTelLoggingExtension. |
|
104 // --------------------------------------------------------------------------- |
|
105 // |
|
106 void CPELogExtensionWrapper::InitializeL( TUint aServiceId, |
|
107 const TDesC& aOrigAddress ) |
|
108 { |
|
109 iPlugin->InitializeL( aServiceId, aOrigAddress ); |
|
110 } |
|
111 |
|
112 |
|
113 // --------------------------------------------------------------------------- |
|
114 // From class CTelLoggingExtension. |
|
115 // --------------------------------------------------------------------------- |
|
116 // |
|
117 TInt CPELogExtensionWrapper::GetPhoneNumber( RBuf& aPhoneNumber ) |
|
118 { |
|
119 return iPlugin->GetPhoneNumber( aPhoneNumber ); |
|
120 } |
|
121 |
|
122 |
|
123 // --------------------------------------------------------------------------- |
|
124 // From class CTelLoggingExtension. |
|
125 // --------------------------------------------------------------------------- |
|
126 // |
|
127 TInt CPELogExtensionWrapper::GetVoipAddress( RBuf& aVoipAddress ) |
|
128 { |
|
129 return iPlugin->GetVoipAddress( aVoipAddress ); |
|
130 } |
|
131 |
|
132 |
|
133 // --------------------------------------------------------------------------- |
|
134 // From class CTelLoggingExtension. |
|
135 // --------------------------------------------------------------------------- |
|
136 // |
|
137 TInt CPELogExtensionWrapper::GetMyAddress( RBuf& aMyAddress ) |
|
138 { |
|
139 return iPlugin->GetMyAddress( aMyAddress ); |
|
140 } |
|
141 |
|
142 |
|
143 // --------------------------------------------------------------------------- |
|
144 // From class CTelLoggingExtension. |
|
145 // --------------------------------------------------------------------------- |
|
146 // |
|
147 TInt CPELogExtensionWrapper::GetRemotePartyName( RBuf& aRemotePartyName ) |
|
148 { |
|
149 return iPlugin->GetRemotePartyName( aRemotePartyName ); |
|
150 } |
|
151 |
|
152 |
|
153 // --------------------------------------------------------------------------- |
|
154 // CPELogExtensionWrapper::CreateLoggingExtensionL |
|
155 // --------------------------------------------------------------------------- |
|
156 // |
|
157 CTelLoggingExtension* CPELogExtensionWrapper::CreateLoggingExtensionL() const |
|
158 { |
|
159 return CTelLoggingExtension::NewL( iPluginUid ); |
|
160 } |
|
161 |
|
162 |
|
163 // --------------------------------------------------------------------------- |
|
164 // CPELogExtensionWrapper::Identifier |
|
165 // --------------------------------------------------------------------------- |
|
166 // |
|
167 TUid CPELogExtensionWrapper::Identifier() const |
|
168 { |
|
169 return iPluginUid; |
|
170 } |