|
1 /* |
|
2 * Copyright (c) 2008 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: execute command for fetching blocked list |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 |
|
20 //#include "cvimpstcmdlogout.h" |
|
21 |
|
22 #include "vimpstcmd.hrh" |
|
23 #include "cvimpstcmdfetchblockedlist.h" |
|
24 #include "mvimpstcmdobserver.h" |
|
25 |
|
26 #include "vimpstdebugprint.h" |
|
27 |
|
28 #include <e32def.h> |
|
29 |
|
30 #include "mvimpstengine.h" |
|
31 |
|
32 |
|
33 // Constants |
|
34 |
|
35 // -------------------------------------------------------------------------- |
|
36 // CVIMPSTCmdFetchBlockedContactList::CVIMPSTCmdFetchBlockedContactList |
|
37 // -------------------------------------------------------------------------- |
|
38 // |
|
39 CVIMPSTCmdFetchBlockedContactList::CVIMPSTCmdFetchBlockedContactList( |
|
40 const TInt aCommandId , MVIMPSTEngine& aEngine) : |
|
41 iCommandId( aCommandId ), |
|
42 iEngine(aEngine) |
|
43 { |
|
44 } |
|
45 |
|
46 // -------------------------------------------------------------------------- |
|
47 // CVIMPSTCmdFetchBlockedContactList::~CVIMPSTCmdFetchBlockedContactList |
|
48 // -------------------------------------------------------------------------- |
|
49 // |
|
50 CVIMPSTCmdFetchBlockedContactList::~CVIMPSTCmdFetchBlockedContactList() |
|
51 { |
|
52 |
|
53 } |
|
54 |
|
55 // -------------------------------------------------------------------------- |
|
56 // CVIMPSTCmdFetchBlockedContactList::NewL |
|
57 // -------------------------------------------------------------------------- |
|
58 // |
|
59 CVIMPSTCmdFetchBlockedContactList* CVIMPSTCmdFetchBlockedContactList::NewL( |
|
60 const TInt aCommandId,MVIMPSTEngine& aEngine) |
|
61 { |
|
62 CVIMPSTCmdFetchBlockedContactList* self = new (ELeave ) CVIMPSTCmdFetchBlockedContactList( aCommandId , aEngine); |
|
63 self->ConstructL(); //use contsurctL if necessary |
|
64 return self; |
|
65 } |
|
66 // -------------------------------------------------------------------------- |
|
67 // CVIMPSTCmdFetchBlockedContactList::ConstructL |
|
68 // -------------------------------------------------------------------------- |
|
69 // |
|
70 void CVIMPSTCmdFetchBlockedContactList::ConstructL() |
|
71 { |
|
72 |
|
73 } |
|
74 |
|
75 // -------------------------------------------------------------------------- |
|
76 // CVIMPSTCmdFetchBlockedContactList::ExecuteLD |
|
77 // -------------------------------------------------------------------------- |
|
78 // |
|
79 void CVIMPSTCmdFetchBlockedContactList::ExecuteLD() |
|
80 { |
|
81 CHAT_DP_FUNC_ENTER("CVIMPSTCmdFetchBlockedContactList::ExecuteLD"); |
|
82 //push to the cleanupstack |
|
83 CleanupStack::PushL( this ); |
|
84 |
|
85 //call logout |
|
86 iEngine.FetchBlockedListL(); |
|
87 |
|
88 CHAT_DP_FUNC_ENTER("CVIMPSTCmdFetchBlockedContactList:: CommandFinished"); |
|
89 |
|
90 if(iObserver) |
|
91 { |
|
92 iObserver->CommandFinishedL(*this); |
|
93 } |
|
94 CHAT_DP_FUNC_ENTER("CVIMPSTCmdFetchBlockedContactList:: CommandFinished"); |
|
95 CleanupStack::PopAndDestroy(); |
|
96 CHAT_DP_FUNC_DONE("CVIMPSTCmdFetchBlockedContactList::ExecuteLD"); |
|
97 } |
|
98 |
|
99 |
|
100 // -------------------------------------------------------------------------- |
|
101 // CVIMPSTCmdFetchBlockedContactList::AddObserver |
|
102 // -------------------------------------------------------------------------- |
|
103 // |
|
104 void CVIMPSTCmdFetchBlockedContactList::AddObserver( MVIMPSTCmdObserver& aObserver ) |
|
105 { |
|
106 // store the observer to notify the command completion |
|
107 iObserver = &aObserver; |
|
108 } |
|
109 |
|
110 |
|
111 // -------------------------------------------------------------------------- |
|
112 // CVIMPSTCmdFetchBlockedContactList::CommandId |
|
113 // -------------------------------------------------------------------------- |
|
114 // |
|
115 TInt CVIMPSTCmdFetchBlockedContactList::CommandId() const |
|
116 { |
|
117 return iCommandId; |
|
118 } |
|
119 |
|
120 // -------------------------------------------------------------------------- |
|
121 // CVIMPSTCmdFetchBlockedContactList::Result |
|
122 // -------------------------------------------------------------------------- |
|
123 // |
|
124 TInt CVIMPSTCmdFetchBlockedContactList::Result() const |
|
125 { |
|
126 //return valid data regd the command operation |
|
127 return 0; |
|
128 } |
|
129 |
|
130 |
|
131 |
|
132 // End of File |