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