26
|
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 :
|
|
13 |
* CCLCKCommandHandler class declaration for AT+CLCK command
|
|
14 |
*/
|
|
15 |
|
|
16 |
#ifndef CLCKCOMMANDHANDLER_H
|
|
17 |
#define CLCKCOMMANDHANDLER_H
|
|
18 |
|
|
19 |
#include <mmretrieve.h>
|
|
20 |
|
32
|
21 |
#include "atcmdasyncbase.h"
|
26
|
22 |
|
|
23 |
class CSecurityCodeVerifier;
|
|
24 |
class CSecurityEventHandler;
|
|
25 |
class CCBSettingHandler;
|
|
26 |
|
|
27 |
enum TInfoClassMask
|
|
28 |
{
|
|
29 |
EInfoClassVoice = 1, // voice (telephony)
|
|
30 |
EInfoClassData = 2, // data (refers to all bearer services; with <mode>=2
|
|
31 |
// this may refer only to some bearer service if TA does
|
|
32 |
// not support values 16, 32, 64 and 128)
|
|
33 |
EInfoClassFax = 4, // fax (facsimile services)
|
|
34 |
EInfoClassSMS = 8, // short message service
|
|
35 |
EInfoClassSyncData = 16, // data circuit sync
|
|
36 |
EInfoClassASyncData = 32, // data circuit async
|
|
37 |
EInfoClassPacketData = 64, // dedicated packet access
|
|
38 |
EInfoClassPadAccess = 128 // dedicated PAD access
|
|
39 |
};
|
|
40 |
|
|
41 |
/**
|
|
42 |
* AT+CLCK command handler implementation class
|
|
43 |
*/
|
|
44 |
NONSHARABLE_CLASS( CCLCKCommandHandler ) : public CATCmdAsyncBase
|
|
45 |
{
|
|
46 |
public:
|
|
47 |
static CCLCKCommandHandler* NewL(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone);
|
|
48 |
~CCLCKCommandHandler();
|
|
49 |
|
|
50 |
// Callback methods for helper objects
|
|
51 |
void HandlePasswordVerification(TInt aError);
|
|
52 |
void HandleSecurityEvent(TInt aError, RMobilePhone::TMobilePhoneSecurityEvent aSecurityEvent);
|
|
53 |
|
|
54 |
private:
|
|
55 |
/**
|
|
56 |
* States for lock setting
|
|
57 |
*/
|
|
58 |
enum TLockSettingState
|
|
59 |
{
|
|
60 |
ELockSettingIdle = 0x01,
|
|
61 |
ELockSettingRequested = 0x02,
|
|
62 |
ELockSettingPasswordRequested = 0x03
|
|
63 |
};
|
|
64 |
|
|
65 |
enum TCLCKCommand
|
|
66 |
{
|
|
67 |
ECLCKUndefined = KErrNotFound,
|
|
68 |
ECLCKLockSet = 0x01,
|
|
69 |
ECLCKLockGet = 0x02,
|
|
70 |
ECLCKBarringSet = 0x03,
|
|
71 |
ECLCKBarringGet = 0x04
|
|
72 |
};
|
|
73 |
|
|
74 |
enum TCmdFacilityType
|
|
75 |
{
|
|
76 |
ECmdFacilityTypeUnknown = 0,
|
|
77 |
ECmdFacilityTypeLock,
|
|
78 |
ECmdFacilityTypeBarring,
|
|
79 |
ECmdFacilityTypeAllBarring
|
|
80 |
};
|
|
81 |
|
|
82 |
private: // methods from CActive
|
|
83 |
virtual void RunL();
|
|
84 |
virtual void DoCancel();
|
|
85 |
// RunError not needed as RunL does not leave
|
|
86 |
|
32
|
87 |
private: // method from CATCmdAsyncBase::MATCmdBase
|
26
|
88 |
virtual void HandleCommand( const TDesC8& aCmd, RBuf8& aReply, TBool aReplyNeeded );
|
32
|
89 |
|
26
|
90 |
private:
|
|
91 |
CCLCKCommandHandler(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone);
|
|
92 |
void ConstructL();
|
|
93 |
|
|
94 |
TInt ParseCCLCKCommand();
|
|
95 |
void IssueCLCKCommand();
|
|
96 |
TInt ReceiveCBList();
|
|
97 |
|
|
98 |
private:
|
|
99 |
CCBSettingHandler* iCBSettingHandler;
|
|
100 |
CSecurityEventHandler* iSecurityEventHandler;
|
|
101 |
CSecurityCodeVerifier* iSecurityCodeVerifier;
|
|
102 |
CRetrieveMobilePhoneCBList* iCBRetrieve;
|
|
103 |
|
|
104 |
RBuf8 iReply;
|
|
105 |
|
|
106 |
TCLCKCommand iCLCKCommandType;
|
|
107 |
RBuf8 iPassword;
|
|
108 |
TInt iInfoClass;
|
|
109 |
|
|
110 |
TLockSettingState iLockSettingState;
|
|
111 |
RMobilePhone::TMobilePhoneLock iLockType;
|
|
112 |
RMobilePhone::TMobilePhoneLockSetting iLockChange;
|
|
113 |
RMobilePhone::TMobilePhoneSecurityCode iSecurityCode;
|
|
114 |
|
|
115 |
RMobilePhone::TMobilePhoneLockInfoV1 iLockInfo;
|
|
116 |
RMobilePhone::TMobilePhoneLockInfoV1Pckg iLockInfoPckg;
|
|
117 |
|
|
118 |
RMobilePhone::TMobilePhoneCBCondition iCondition;
|
|
119 |
RMobilePhone::TMobilePhoneCBChangeV1 iCBInfo;
|
|
120 |
};
|
|
121 |
|
|
122 |
#endif // CLCKCOMMANDHANDLER_H
|