|
1 /* |
|
2 * Copyright (c) 2004 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: Presence attribute transactions. |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "CPEngAttributeTransaction2.h" |
|
20 #include "CPEngAttributeTransaction2Imp.h" |
|
21 #include "TPEngMDesCArrayAdapter.h" |
|
22 |
|
23 |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CPEngAttributeTransaction2::NewL() |
|
30 // Two-phased constructor. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 EXPORT_C CPEngAttributeTransaction2* CPEngAttributeTransaction2::NewL( |
|
34 const CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
35 TInt aPriority ) |
|
36 { |
|
37 CPEngAttributeTransaction2* self = CPEngAttributeTransaction2::NewLC( |
|
38 aNWSessionSlotID, |
|
39 aPriority ); |
|
40 CleanupStack::Pop( self ); |
|
41 return self; |
|
42 } |
|
43 |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CPEngAttributeTransaction2::NewLC() |
|
47 // Two-phased constructor. |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 EXPORT_C CPEngAttributeTransaction2* CPEngAttributeTransaction2::NewLC( |
|
51 const CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
52 TInt aPriority ) |
|
53 { |
|
54 CPEngAttributeTransaction2* self = new ( ELeave ) CPEngAttributeTransaction2; |
|
55 CleanupStack::PushL( self ); |
|
56 self->iImp = CPEngAttributeTransaction2Imp::NewL( *self, |
|
57 aPriority, |
|
58 aNWSessionSlotID ); |
|
59 return self; |
|
60 } |
|
61 |
|
62 |
|
63 |
|
64 // Destructor |
|
65 CPEngAttributeTransaction2::~CPEngAttributeTransaction2() |
|
66 { |
|
67 delete iImp; |
|
68 } |
|
69 |
|
70 |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CPEngAttributeTransaction2::CPEngAttributeTransaction2 |
|
74 // C++ default constructor can NOT contain any code, that |
|
75 // might leave. |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 CPEngAttributeTransaction2::CPEngAttributeTransaction2() |
|
79 { |
|
80 } |
|
81 |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CPEngAttributeTransaction2::IsPublishOwnAttributesActive() |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 EXPORT_C TBool CPEngAttributeTransaction2::IsPublishOwnAttributesActive() const |
|
88 { |
|
89 return iImp->IsPublishOwnAttributesActive(); |
|
90 } |
|
91 |
|
92 |
|
93 |
|
94 // ----------------------------------------------------------------------------- |
|
95 // CPEngAttributeTransaction2::PublishAndUnLockOwnAttribute() |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 EXPORT_C TInt CPEngAttributeTransaction2::PublishAndUnLockOwnAttribute( |
|
99 MPEngPresenceAttrModel2*& aModel, |
|
100 MPEngAttributeTransactionObserver2& aObserver ) |
|
101 { |
|
102 return iImp->PublishAndUnLockOwnAttribute( aModel, |
|
103 aObserver ); |
|
104 } |
|
105 |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // CPEngAttributeTransaction2::PublishAndUnLockOwnAttributes() |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 EXPORT_C TInt CPEngAttributeTransaction2::PublishAndUnLockOwnAttributes( |
|
112 RPointerArray<MPEngPresenceAttrModel2>& aModels, |
|
113 MPEngAttributeTransactionObserver2& aObserver ) |
|
114 { |
|
115 return iImp->PublishAndUnLockOwnAttributes( aModels, |
|
116 aObserver ); |
|
117 } |
|
118 |
|
119 |
|
120 // ----------------------------------------------------------------------------- |
|
121 // CPEngAttributeTransaction2::CancelPublishOwnAttributes() |
|
122 // ----------------------------------------------------------------------------- |
|
123 // |
|
124 EXPORT_C void CPEngAttributeTransaction2::CancelPublishOwnAttributes() |
|
125 { |
|
126 iImp->CancelPublishOwnAttributes(); |
|
127 } |
|
128 |
|
129 |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // CPEngAttributeTransaction2::IsFetchAttributesActive() |
|
133 // ----------------------------------------------------------------------------- |
|
134 // |
|
135 EXPORT_C TBool CPEngAttributeTransaction2::IsFetchAttributesActive() const |
|
136 { |
|
137 return iImp->IsFetchAttributesActive(); |
|
138 } |
|
139 |
|
140 |
|
141 |
|
142 // ----------------------------------------------------------------------------- |
|
143 // CPEngAttributeTransaction2::FetchAttributesToCache() |
|
144 // ----------------------------------------------------------------------------- |
|
145 // |
|
146 EXPORT_C TInt CPEngAttributeTransaction2::FetchAttributesToCache( |
|
147 const TDesC& aPresenceID, |
|
148 const TArray<TUint32>& aTypes, |
|
149 MPEngAttributeTransactionObserver2& aObserver, |
|
150 TInt aOptions ) |
|
151 { |
|
152 TPEngMDesCArrayAdapter adapter( aPresenceID ); |
|
153 return iImp->FetchAttributes( adapter, |
|
154 aTypes, |
|
155 aObserver, |
|
156 aOptions, |
|
157 EFalse ); |
|
158 } |
|
159 |
|
160 |
|
161 // ----------------------------------------------------------------------------- |
|
162 // CPEngAttributeTransaction2::FetchAttributesToCache() |
|
163 // ----------------------------------------------------------------------------- |
|
164 // |
|
165 EXPORT_C TInt CPEngAttributeTransaction2::FetchAttributesToCache( |
|
166 const MDesCArray& aPresenceIDs, |
|
167 const TArray<TUint32>& aTypes, |
|
168 MPEngAttributeTransactionObserver2& aObserver, |
|
169 TInt aOptions ) |
|
170 { |
|
171 return iImp->FetchAttributes( aPresenceIDs, |
|
172 aTypes, |
|
173 aObserver, |
|
174 aOptions, |
|
175 EFalse ); |
|
176 } |
|
177 |
|
178 |
|
179 // ----------------------------------------------------------------------------- |
|
180 // CPEngAttributeTransaction2::FetchAttributesToObjects() |
|
181 // ----------------------------------------------------------------------------- |
|
182 // |
|
183 EXPORT_C TInt CPEngAttributeTransaction2::FetchAttributesToObjects( |
|
184 const TDesC& aPresenceID, |
|
185 const TArray<TUint32>& aTypes, |
|
186 MPEngAttributeTransactionObserver2& aObserver ) |
|
187 { |
|
188 TPEngMDesCArrayAdapter adapter( aPresenceID ); |
|
189 return iImp->FetchAttributes( adapter, |
|
190 aTypes, |
|
191 aObserver, |
|
192 KErrNone, //No options |
|
193 ETrue ); |
|
194 } |
|
195 |
|
196 |
|
197 // ----------------------------------------------------------------------------- |
|
198 // CPEngAttributeTransaction2::CancelFetchAttributes() |
|
199 // ----------------------------------------------------------------------------- |
|
200 // |
|
201 EXPORT_C void CPEngAttributeTransaction2::CancelFetchAttributes() |
|
202 { |
|
203 iImp->CancelFetchAttributes(); |
|
204 } |
|
205 |
|
206 |
|
207 // ----------------------------------------------------------------------------- |
|
208 // CPEngAttributeTransaction2::GetFetchedAttributes() |
|
209 // ----------------------------------------------------------------------------- |
|
210 // |
|
211 EXPORT_C TInt CPEngAttributeTransaction2::GetFetchedAttributes( |
|
212 RPointerArray< MPEngPresenceAttrModel2>& aModels ) |
|
213 { |
|
214 return iImp->GetFetchedAttributes( aModels ); |
|
215 } |
|
216 |
|
217 |
|
218 |
|
219 // End of File |
|
220 |
|
221 |