|
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 #ifndef CPENGATTRIBUTETRANSACTION2IMP_H |
|
19 #define CPENGATTRIBUTETRANSACTION2IMP_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32Base.h> |
|
23 #include <CPEngAttributeTransaction2.h> |
|
24 #include "MPEngAsyncOperationOwner.h" |
|
25 #include "RPEngManagerClient.h" |
|
26 |
|
27 |
|
28 |
|
29 //FORWARD DECLARATIONS |
|
30 class CPEngAttributeTransaction2; |
|
31 class CPEngAsyncOperation; |
|
32 class CPEngNWSessionSlotID2; |
|
33 class CPEngNWSessionSlotStorageProxy; |
|
34 class CPEngAttributeFetchOp; |
|
35 |
|
36 |
|
37 /** |
|
38 * Presence attribute transactions. |
|
39 * |
|
40 * @since 3.0 |
|
41 */ |
|
42 NONSHARABLE_CLASS( CPEngAttributeTransaction2Imp ): public CBase, |
|
43 public MPEngAsyncOperationOwner |
|
44 |
|
45 { |
|
46 public: /* Construction */ |
|
47 |
|
48 |
|
49 /** |
|
50 * Instantiates CPEngAttributeTransaction2Imp object. |
|
51 * |
|
52 * @return New CPEngAttributeTransaction2Imp instance. |
|
53 */ |
|
54 static CPEngAttributeTransaction2Imp* NewL( |
|
55 CPEngAttributeTransaction2& aInterface, |
|
56 TInt aPriority, |
|
57 const CPEngNWSessionSlotID2& aNWSessionSlotID ); |
|
58 |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 ~CPEngAttributeTransaction2Imp(); |
|
64 |
|
65 |
|
66 |
|
67 protected: |
|
68 |
|
69 /** |
|
70 * C++ constructor. |
|
71 */ |
|
72 CPEngAttributeTransaction2Imp( |
|
73 CPEngAttributeTransaction2& aInterface, |
|
74 TInt aPriority ); |
|
75 |
|
76 |
|
77 /** |
|
78 * Symbian OS constructor. |
|
79 */ |
|
80 void ConstructL( const CPEngNWSessionSlotID2& aNWSessionSlotID ); |
|
81 |
|
82 |
|
83 |
|
84 public: /* Attribute transaction implementation */ |
|
85 |
|
86 TBool IsPublishOwnAttributesActive() const; |
|
87 |
|
88 |
|
89 TInt PublishAndUnLockOwnAttribute( |
|
90 MPEngPresenceAttrModel2*& aModel, |
|
91 MPEngAttributeTransactionObserver2& aObserver ); |
|
92 |
|
93 |
|
94 TInt PublishAndUnLockOwnAttributes( |
|
95 RPointerArray<MPEngPresenceAttrModel2>& aModels, |
|
96 MPEngAttributeTransactionObserver2& aObserver ); |
|
97 |
|
98 |
|
99 void CancelPublishOwnAttributes(); |
|
100 |
|
101 |
|
102 TBool IsFetchAttributesActive() const; |
|
103 |
|
104 |
|
105 TInt FetchAttributes( const MDesCArray& aPresenceIDs, |
|
106 const TArray<TUint32>& aTypes, |
|
107 MPEngAttributeTransactionObserver2& aObserver, |
|
108 TInt aOptions, |
|
109 TBool aResultAsLoclObjects ); |
|
110 |
|
111 void CancelFetchAttributes(); |
|
112 TInt GetFetchedAttributes( RPointerArray< MPEngPresenceAttrModel2>& aModels ); |
|
113 |
|
114 |
|
115 private: //from MPEngAsyncOperationOwner |
|
116 |
|
117 |
|
118 /** |
|
119 * Notifies from async operation destruction. |
|
120 * @since 3.0 |
|
121 * @param aOperation The dying operation. |
|
122 */ |
|
123 void HandleAsyncOperationDestruction( CPEngAsyncOperation* aOperation ); |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 private: //Implementation |
|
130 |
|
131 |
|
132 |
|
133 private: //Data |
|
134 |
|
135 //REF: Implemented interface |
|
136 CPEngAttributeTransaction2& iInterface; |
|
137 |
|
138 //OWN: The priority |
|
139 TInt iCActivePriority; |
|
140 |
|
141 //OWN: |
|
142 CPEngNWSessionSlotStorageProxy* iUsedSlot; |
|
143 |
|
144 //OWN: Attribute fetch |
|
145 CPEngAttributeFetchOp* iAttributeFetchOp; |
|
146 |
|
147 //OWN: Attribute publish |
|
148 CPEngAsyncOperation* iAttributePublishOp; |
|
149 |
|
150 // OWN: Server |
|
151 RPEngManagerClient iTransactionServer; |
|
152 |
|
153 }; |
|
154 |
|
155 #endif // CPENGATTRIBUTETRANSACTION2IMP_H |
|
156 |
|
157 // End of File |