|
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 * |
|
13 * Description : |
|
14 * |
|
15 * CCFUNCommandHandler class declaration for AT+CFUN command |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CFUNCOMMANDHANDLER_H |
|
20 #define CFUNCOMMANDHANDLER_H |
|
21 |
|
22 #include "atmisccmdplugin.h" |
|
23 |
|
24 const TInt KGeneralProfileId = 0; |
|
25 const TInt KOfflineProfileId = 5; |
|
26 |
|
27 class MProfileEngine; |
|
28 |
|
29 /** |
|
30 * AT+CFUN command handler implementation class |
|
31 */ |
|
32 NONSHARABLE_CLASS( CCFUNCommandHandler ) : public CATCmdAsyncBase |
|
33 { |
|
34 public: |
|
35 static CCFUNCommandHandler* NewL(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone); |
|
36 ~CCFUNCommandHandler(); |
|
37 |
|
38 private: // methods from CActive |
|
39 virtual void RunL(); |
|
40 virtual void DoCancel(); |
|
41 // RunError not needed as RunL does not leave |
|
42 |
|
43 private: // methods from CATCmdAsyncBase |
|
44 virtual void HandleCommand( const TDesC8& aCmd, RBuf8& aReply, TBool aReplyNeeded ); |
|
45 virtual void HandleCommandCancel(); |
|
46 |
|
47 private: |
|
48 CCFUNCommandHandler(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone); |
|
49 void ConstructL(); |
|
50 |
|
51 TInt ActivateProfile(TInt aFunc, TInt aReset); |
|
52 TInt SetActiveProfile(TInt aProfileId); |
|
53 TInt RestartDevice(); |
|
54 |
|
55 private: |
|
56 RBuf8 iReply; |
|
57 |
|
58 MProfileEngine* iProfileEngine; |
|
59 }; |
|
60 |
|
61 #endif /* CFUNCOMMANDHANDLER_H */ |