|
1 /* |
|
2 * Copyright (c) 2006 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 for managing cached presence publish information. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <ximpobjectcollection.h> |
|
20 #include <presenceinfo.h> |
|
21 #include <ximpdatasubscriptionstate.h> |
|
22 #include <ximpstatus.h> |
|
23 |
|
24 #include "protocolpresencedatahostimp.h" |
|
25 #include "protocolpresencepublishingdatahostimp.h" |
|
26 |
|
27 #include "ximpoperationbase.h" |
|
28 #include "ximpoperationfactory.h" |
|
29 #include "ximprestrictedobjectcollectionimp.h" |
|
30 #include "ximpglobals.h" |
|
31 #include "ximphost.h" |
|
32 #include "presencedatacacheimp.h" |
|
33 #include "presenceoperationdefs.h" |
|
34 #include "ximptrace.h" |
|
35 |
|
36 // ======== LOCAL FUNCTIONS ======== |
|
37 |
|
38 |
|
39 // ======== MEMBER FUNCTIONS ======== |
|
40 |
|
41 |
|
42 // --------------------------------------------------------------------------- |
|
43 // CProtocolPresencePublishingDataHostImp::NewL() |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 EXPORT_C CProtocolPresencePublishingDataHostImp* |
|
47 CProtocolPresencePublishingDataHostImp::NewL( MXIMPHost& aHost ) |
|
48 { |
|
49 CProtocolPresencePublishingDataHostImp* self = |
|
50 new( ELeave ) CProtocolPresencePublishingDataHostImp( aHost ); |
|
51 CleanupStack::PushL( self ); |
|
52 self->ConstructL(); |
|
53 CleanupStack::Pop( self ); |
|
54 return self; |
|
55 } |
|
56 |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // Implement supported interface access. |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 XIMPIMP_IF_BASE_GET_INTERFACE_BEGIN( CProtocolPresencePublishingDataHostImp, |
|
63 MProtocolPresencePublishingDataHost ) |
|
64 XIMPIMP_IF_BASE_GET_INTERFACE_END() |
|
65 |
|
66 XIMPIMP_IF_BASE_GET_CONST_INTERFACE_BEGIN( CProtocolPresencePublishingDataHostImp, |
|
67 MProtocolPresencePublishingDataHost ) |
|
68 XIMPIMP_IF_BASE_GET_INTERFACE_END() |
|
69 |
|
70 |
|
71 // --------------------------------------------------------------------------- |
|
72 // CProtocolPresencePublishingDataHostImp::~CProtocolPresencePublishingDataHostImp() |
|
73 // --------------------------------------------------------------------------- |
|
74 // |
|
75 CProtocolPresencePublishingDataHostImp::~CProtocolPresencePublishingDataHostImp() |
|
76 { |
|
77 } |
|
78 |
|
79 |
|
80 // --------------------------------------------------------------------------- |
|
81 // CProtocolPresencePublishingDataHostImp::CProtocolPresencePublishingDataHostImp() |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 CProtocolPresencePublishingDataHostImp::CProtocolPresencePublishingDataHostImp( |
|
85 MXIMPHost& aHost ) |
|
86 : iHost( aHost ) |
|
87 { |
|
88 } |
|
89 |
|
90 // --------------------------------------------------------------------------- |
|
91 // CProtocolPresencePublishingDataHostImp::ConstructL() |
|
92 // --------------------------------------------------------------------------- |
|
93 // |
|
94 void CProtocolPresencePublishingDataHostImp::ConstructL() |
|
95 { |
|
96 } |
|
97 |
|
98 // --------------------------------------------------------------------------- |
|
99 // CProtocolPresencePublishingDataHostImp::HandleSubscribedOwnPresenceL() |
|
100 // --------------------------------------------------------------------------- |
|
101 // |
|
102 TXIMPRequestId |
|
103 CProtocolPresencePublishingDataHostImp::HandleSubscribedOwnPresenceL( |
|
104 MPresenceInfo* aPresenceInfo ) |
|
105 { |
|
106 TRACE(_L("CProtocolPresencePublishingDataHostImp::HandleSubscribedOwnPresenceL") ); |
|
107 return iHost.AddNewOperationL( NPresenceOps::EPrHandleOwnPresence, |
|
108 aPresenceInfo ); |
|
109 } |
|
110 |
|
111 |
|
112 // --------------------------------------------------------------------------- |
|
113 // CProtocolPresencePublishingDataHostImp::OwnPresenceDataSubscriptionState() |
|
114 // --------------------------------------------------------------------------- |
|
115 // |
|
116 const MXIMPDataSubscriptionState& |
|
117 CProtocolPresencePublishingDataHostImp::OwnPresenceDataSubscriptionState() const |
|
118 { |
|
119 TRACE(_L("CProtocolPresencePublishingDataHostImp::OwnPresenceDataSubscriptionState") ); |
|
120 return iHost.PresenceDataAccess().PresenceDataCache().OwnPresenceDataSubscriptionState(); |
|
121 } |
|
122 |
|
123 // --------------------------------------------------------------------------- |
|
124 // CProtocolPresencePublishingDataHostImp::SetOwnPresenceDataSubscriptionStateL() |
|
125 // --------------------------------------------------------------------------- |
|
126 // |
|
127 TXIMPRequestId CProtocolPresencePublishingDataHostImp::SetOwnPresenceDataSubscriptionStateL( |
|
128 MXIMPDataSubscriptionState* aSubscriptionState, |
|
129 MXIMPStatus* aStatus ) |
|
130 { |
|
131 TRACE(_L("CProtocolPresencePublishingDataHostImp::SetOwnPresenceDataSubscriptionStateL") ); |
|
132 return iHost.AddNewOperationL( NPresenceOps::EPrSetOwnPresenceDataSubscriptionState, |
|
133 aSubscriptionState, aStatus ); |
|
134 } |
|
135 |
|
136 // --------------------------------------------------------------------------- |
|
137 // CProtocolPresencePublishingDataHostImp::HandlePresenceWatcherListL() |
|
138 // --------------------------------------------------------------------------- |
|
139 // |
|
140 TXIMPRequestId |
|
141 CProtocolPresencePublishingDataHostImp::HandlePresenceWatcherListL( |
|
142 MXIMPObjectCollection* aWatcherList ) |
|
143 { |
|
144 TRACE(_L("CProtocolPresencePublishingDataHostImp::HandlePresenceWatcherListL") ); |
|
145 return iHost.AddNewOperationL( NPresenceOps::EPrHandlePresenceWatcherList, |
|
146 aWatcherList ); |
|
147 } |
|
148 |
|
149 // --------------------------------------------------------------------------- |
|
150 // CProtocolPresencePublishingDataHostImp::HandlePresenceWatcherListL() |
|
151 // --------------------------------------------------------------------------- |
|
152 // |
|
153 const MXIMPDataSubscriptionState& |
|
154 CProtocolPresencePublishingDataHostImp::PresenceWatcherListDataSubscriptionState() const |
|
155 { |
|
156 TRACE(_L("CProtocolPresencePublishingDataHostImp::PresenceWatcherListDataSubscriptionState") ); |
|
157 return iHost.PresenceDataAccess().PresenceDataCache().PresenceWatcherListDataSubscriptionState(); |
|
158 } |
|
159 |
|
160 // --------------------------------------------------------------------------- |
|
161 // CProtocolPresencePublishingDataHostImp::HandlePresenceWatcherListL() |
|
162 // --------------------------------------------------------------------------- |
|
163 // |
|
164 TXIMPRequestId |
|
165 CProtocolPresencePublishingDataHostImp::SetPresenceWatcherListDataSubscriptionStateL( |
|
166 MXIMPDataSubscriptionState* aSubscriptionState, |
|
167 MXIMPStatus* aStatus ) |
|
168 { |
|
169 TRACE(_L("CProtocolPresencePublishingDataHostImp::SetPresenceWatcherListDataSubscriptionStateL") ); |
|
170 return iHost.AddNewOperationL( NPresenceOps::EPrSetPresenceWatcherListDataSubscriptionState, |
|
171 aSubscriptionState, aStatus ); |
|
172 } |
|
173 |
|
174 // End of file |
|
175 |