|
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: Remove Presentity Group Member operation |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <s32mem.h> |
|
19 #include <ximpprotocolconnection.h> |
|
20 #include <protocolpresentitygroups.h> |
|
21 #include <protocolpresencefeatures.h> |
|
22 |
|
23 #include "operationremovepresentitygroupmember.h" |
|
24 #include "ximpidentityimp.h" |
|
25 #include "protocolpresentitygroupsdatahostimp.h" |
|
26 #include "ximphost.h" |
|
27 #include "ximpstatusimp.h" |
|
28 #include "protocolpresencedatahostimp.h" |
|
29 |
|
30 #include "ximptrace.h" |
|
31 // ======== MEMBER FUNCTIONS ======== |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 // COperationRemovePresentityGroupMember::COperationRemovePresentityGroupMember() |
|
35 // --------------------------------------------------------------------------- |
|
36 // |
|
37 EXPORT_C COperationRemovePresentityGroupMember::COperationRemovePresentityGroupMember() |
|
38 { |
|
39 } |
|
40 |
|
41 |
|
42 // --------------------------------------------------------------------------- |
|
43 // COperationRemovePresentityGroupMember::ConstructL |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 void COperationRemovePresentityGroupMember::ConstructL( const TDesC8& aParamPck ) |
|
47 { |
|
48 RDesReadStream rs; |
|
49 rs.Open( aParamPck ); // CSI: 65 # Does not return a value. |
|
50 CleanupClosePushL( rs ); |
|
51 |
|
52 // group id |
|
53 iGroupId = CXIMPIdentityImp::NewLC(); |
|
54 CleanupStack::Pop( iGroupId ); |
|
55 iGroupId->InternalizeL( rs ); |
|
56 |
|
57 // member id |
|
58 iMemberId = CXIMPIdentityImp::NewLC(); |
|
59 CleanupStack::Pop( iMemberId ); |
|
60 iMemberId->InternalizeL( rs ); |
|
61 |
|
62 |
|
63 CleanupStack::PopAndDestroy( 1 ); // rs |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------------------------- |
|
67 // COperationRemovePresentityGroupMember::~COperationRemovePresentityGroupMember() |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 COperationRemovePresentityGroupMember::~COperationRemovePresentityGroupMember() |
|
71 { |
|
72 delete iGroupId; |
|
73 delete iMemberId; |
|
74 } |
|
75 |
|
76 // --------------------------------------------------------------------------- |
|
77 // COperationRemovePresentityGroupMember::ProcessL() |
|
78 // --------------------------------------------------------------------------- |
|
79 // |
|
80 void COperationRemovePresentityGroupMember::ProcessL() |
|
81 { |
|
82 TRACE(_L("COperationRemovePresentityGroupMember::ProcessL()" ) ); |
|
83 CXIMPOperationBase::ProcessL(); |
|
84 |
|
85 MProtocolPresentityGroups& presentityGroups = iMyHost->GetConnection().ProtocolPresenceFeatures().PresentityGroups(); |
|
86 |
|
87 presentityGroups.DoRemovePresentityGroupMemberL( *iGroupId, |
|
88 *iMemberId, |
|
89 iReqId ); |
|
90 } |
|
91 |
|
92 // --------------------------------------------------------------------------- |
|
93 // COperationRemovePresentityGroupMember::RequestCompleted() |
|
94 // --------------------------------------------------------------------------- |
|
95 // |
|
96 void COperationRemovePresentityGroupMember::RequestCompletedL() |
|
97 { |
|
98 TRACE(_L("COperationRemovePresentityGroupMember::RequestCompletedL()" ) ); |
|
99 CXIMPOperationBase::RequestCompletedL(); |
|
100 |
|
101 if ( iStatusObj->ResultCode() == KErrNone ) |
|
102 { |
|
103 iMyHost->PresenceDataAccess().GroupsDataAccess().HandlePresentityGroupMemberRemovedL( iGroupId, iMemberId ); |
|
104 iGroupId = NULL; |
|
105 iMemberId = NULL; |
|
106 } |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // COperationRemovePresentityGroupMember::Type() |
|
111 // --------------------------------------------------------------------------- |
|
112 // |
|
113 TInt COperationRemovePresentityGroupMember::Type() const |
|
114 { |
|
115 return NPresenceOps::EPrRemovePresentityGroupMember; |
|
116 } |
|
117 |
|
118 |
|
119 // End of file |