33
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2009 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: It is parser for PCN specific procedures.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPHONEGSMPCNPROCEDUREPARSER_H
|
|
20 |
#define CPHONEGSMPCNPROCEDUREPARSER_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include "cphonegsmparserbase.h"
|
|
24 |
|
|
25 |
// CONSTANTS
|
|
26 |
|
|
27 |
/*
|
|
28 |
* Perfom SIM locking.
|
|
29 |
*/
|
|
30 |
const TUint32 KPhoneUidSimLockCode =
|
|
31 |
PHONE_MAKE_UID( KPhoneGsmUidPcnProcedures, 0 );
|
|
32 |
|
|
33 |
/*
|
|
34 |
* Perform SIM unlocking.
|
|
35 |
*/
|
|
36 |
const TUint32 KPhoneUidSimUnlockCode =
|
|
37 |
PHONE_MAKE_UID( KPhoneGsmUidPcnProcedures, 1 );
|
|
38 |
|
|
39 |
// CLASS DECLARATION
|
|
40 |
|
|
41 |
/**
|
|
42 |
* It is parser for GsmPcn specific procedures.
|
|
43 |
*
|
|
44 |
* @since 1.0
|
|
45 |
* @lib phoneparser.lib
|
|
46 |
*/
|
|
47 |
NONSHARABLE_CLASS( CPhoneGsmPcnProcedureParser )
|
|
48 |
: public CPhoneGsmParserBase
|
|
49 |
{
|
|
50 |
public: // Constructors and destructor
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Two-phased constructor.
|
|
54 |
*/
|
|
55 |
static CPhoneGsmPcnProcedureParser* NewLC();
|
|
56 |
|
|
57 |
public: // Functions from base classes
|
|
58 |
|
|
59 |
/**
|
|
60 |
* From CPhoneGsmParserBase, parses string.
|
|
61 |
*
|
|
62 |
* String must not contain other characters than from set
|
|
63 |
* { 0..9, *, #, +, p, w }. If method leaves, then result
|
|
64 |
* may contain something that is not valid.
|
|
65 |
*
|
|
66 |
* @param aString string to be parsed.
|
|
67 |
* @param aResult It will contain result.
|
|
68 |
* @param aOptions It contains all options related to parsing.
|
|
69 |
* @return It returns boolean value indicating success of parsing.
|
|
70 |
*/
|
|
71 |
TBool ParseL(
|
|
72 |
const TDesC& aString,
|
|
73 |
CPhoneGsmParserResult& aResult,
|
|
74 |
CPhoneGsmOptionContainerBase& aOptions );
|
|
75 |
|
|
76 |
private:
|
|
77 |
|
|
78 |
/**
|
|
79 |
* C++ default constructor.
|
|
80 |
*/
|
|
81 |
CPhoneGsmPcnProcedureParser();
|
|
82 |
|
|
83 |
/**
|
|
84 |
* Handles SIM lock closing.
|
|
85 |
*/
|
|
86 |
TBool HandleSimLockCodeL(
|
|
87 |
const TDesC& aString,
|
|
88 |
CPhoneGsmParserResult& aResult );
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Handles SIM lock opening.
|
|
92 |
*/
|
|
93 |
TBool HandleSimUnlockCodeL(
|
|
94 |
const TDesC& aString,
|
|
95 |
CPhoneGsmParserResult& aResult );
|
|
96 |
|
|
97 |
/**
|
|
98 |
* Handle lock commands.
|
|
99 |
*
|
|
100 |
* @param aString string.
|
|
101 |
* @param aResult result.
|
|
102 |
*/
|
|
103 |
TBool HandleLockCodeParametersL(
|
|
104 |
const TDesC& aString,
|
|
105 |
CPhoneGsmParserResult& aResult );
|
|
106 |
|
|
107 |
};
|
|
108 |
|
|
109 |
#endif // CPHONEGSMPCNPROCEDUREPARSER_H
|
|
110 |
|
|
111 |
// End of File
|