|
1 /* |
|
2 * Copyright (c) 2010 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 * Initial Contributors: |
|
9 * Nokia Corporation - initial contribution. |
|
10 * |
|
11 * Contributors: |
|
12 * Description : CPwdCommandHandler class declaration for AT+CPWD command |
|
13 * |
|
14 */ |
|
15 |
|
16 |
|
17 #ifndef CPWDCOMMANDHANDLER_H |
|
18 #define CPWDCOMMANDHANDLER_H |
|
19 #include <e32base.h> |
|
20 #include <etelmm.h> |
|
21 |
|
22 #include "atmisccmdplugin.h" |
|
23 |
|
24 /** |
|
25 * This class implements an AO for AT+CPWD command using ATExt plugin framework. |
|
26 */ |
|
27 NONSHARABLE_CLASS( CCPWDCommandHandler ) : public CATCmdAsyncBase |
|
28 { |
|
29 public: |
|
30 /** |
|
31 * @param aCallback is used to notfiy ATExt server to complete the AT command request. |
|
32 */ |
|
33 static CCPWDCommandHandler* NewL(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone); |
|
34 ~CCPWDCommandHandler(); |
|
35 |
|
36 private: |
|
37 // methods inherited from CActive |
|
38 virtual void RunL(); |
|
39 virtual void DoCancel(); |
|
40 // RunError is not required because RunL doesn't leave. |
|
41 |
|
42 /** |
|
43 * @see CATCmdAsyncBase::HandleCommand |
|
44 */ |
|
45 virtual void HandleCommand( const TDesC8& aCmd, RBuf8& aReply, TBool aReplyNeeded ); |
|
46 /** |
|
47 * @see CATCmdAsyncBase::HandleCommandCancel |
|
48 */ |
|
49 virtual void HandleCommandCancel(); |
|
50 |
|
51 CCPWDCommandHandler(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone); |
|
52 void ConstructL(); |
|
53 |
|
54 /** |
|
55 * Change password according to AT command arguments |
|
56 */ |
|
57 void ChangePassword(); |
|
58 |
|
59 /** |
|
60 * request Etel server to change password and active the AO |
|
61 * @param aType type of password to be changed |
|
62 * @param aOldPassword old password |
|
63 * @param aNewPassword new password |
|
64 */ |
|
65 void ChangeSecurityCode(RMobilePhone::TMobilePhoneSecurityCode aType, TDesC8& aOldPassword, TDesC8& aNewPassword); |
|
66 |
|
67 private: |
|
68 TInt iPendingEvent; |
|
69 }; |
|
70 |
|
71 #endif /* CPWDCOMMANDHANDLER_H */ |