|
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: Concrete bind operation |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <ximpprotocolconnection.h> |
|
19 #include <protocolpresentitygroups.h> |
|
20 #include <protocolpresencefeatures.h> |
|
21 |
|
22 #include "operationdeletepresentitygroup.h" |
|
23 #include "presentitygroupinfoimp.h" |
|
24 #include "ximpobjecthelpers.h" |
|
25 #include "protocolpresentitygroupsdatahostimp.h" |
|
26 #include "ximphost.h" |
|
27 #include "ximpstatusimp.h" |
|
28 #include "ximpidentityimp.h" |
|
29 #include "protocolpresencedatahostimp.h" |
|
30 |
|
31 #include "ximptrace.h" |
|
32 // ======== MEMBER FUNCTIONS ======== |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // COperationDeletePresentityGroup::COperationDeletePresentityGroup() |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 EXPORT_C COperationDeletePresentityGroup::COperationDeletePresentityGroup() |
|
39 { |
|
40 } |
|
41 |
|
42 |
|
43 // --------------------------------------------------------------------------- |
|
44 // COperationDeletePresentityGroup::ConstructL |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 void COperationDeletePresentityGroup::ConstructL( const TDesC8& aParamPck ) |
|
48 { |
|
49 CPresentityGroupInfoImp* groupInfo = CPresentityGroupInfoImp::NewLC(); |
|
50 TXIMPObjectPacker< CPresentityGroupInfoImp >::UnPackL( *groupInfo, |
|
51 aParamPck ); |
|
52 CleanupStack::Pop( groupInfo ); |
|
53 iGroupInfo = groupInfo; |
|
54 } |
|
55 |
|
56 // --------------------------------------------------------------------------- |
|
57 // COperationDeletePresentityGroup::~COperationDeletePresentityGroup() |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 COperationDeletePresentityGroup::~COperationDeletePresentityGroup() |
|
61 { |
|
62 delete iGroupInfo; |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------------------------- |
|
66 // COperationDeletePresentityGroup::ProcessL() |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 void COperationDeletePresentityGroup::ProcessL() |
|
70 { |
|
71 TRACE(_L("COperationDeletePresentityGroup::ProcessL()" ) ); |
|
72 CXIMPOperationBase::ProcessL(); |
|
73 |
|
74 MProtocolPresentityGroups& presentityGroups = iMyHost->GetConnection().ProtocolPresenceFeatures().PresentityGroups(); |
|
75 |
|
76 presentityGroups.DoDeletePresentityGroupL( iGroupInfo->GroupId(), iReqId ); |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // COperationDeletePresentityGroup::RequestCompleted() |
|
81 // --------------------------------------------------------------------------- |
|
82 // |
|
83 void COperationDeletePresentityGroup::RequestCompletedL() |
|
84 { |
|
85 TRACE(_L("COperationDeletePresentityGroup::RequestCompletedL()" ) ); |
|
86 CXIMPOperationBase::RequestCompletedL(); |
|
87 |
|
88 if ( iStatusObj->ResultCode() == KErrNone ) |
|
89 { |
|
90 CXIMPIdentityImp* identity = CXIMPIdentityImp::NewLC( iGroupInfo->Identity().Identity() ); |
|
91 iMyHost->PresenceDataAccess().GroupsDataAccess().HandlePresentityGroupDeletedL( identity ); |
|
92 CleanupStack::Pop( identity ); |
|
93 } |
|
94 } |
|
95 |
|
96 // --------------------------------------------------------------------------- |
|
97 // COperationDeletePresentityGroup::Type() |
|
98 // --------------------------------------------------------------------------- |
|
99 // |
|
100 TInt COperationDeletePresentityGroup::Type() const |
|
101 { |
|
102 return NPresenceOps::EPrDeletePresentityGroup; |
|
103 } |
|
104 |
|
105 |
|
106 // End of file |