47
|
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 |
* SCPBWCommandHandler class declaration for AT^SCPBW command
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef SCPBWCOMMANDHANDLER_H
|
|
20 |
#define SCPBWCOMMANDHANDLER_H
|
|
21 |
|
|
22 |
#include "atcmdasyncbase.h"
|
|
23 |
|
|
24 |
#include <etelmm.h>
|
|
25 |
#include <rmmcustomapi.h>
|
|
26 |
|
|
27 |
class CPhoneBookBuffer;
|
|
28 |
|
|
29 |
/**
|
|
30 |
* AT^SCPBW command handler implementation class
|
|
31 |
*/
|
|
32 |
NONSHARABLE_CLASS( CSCPBWCommandHandler ) : public CATCmdAsyncBase
|
|
33 |
{
|
|
34 |
private:
|
|
35 |
enum TSCPBWState
|
|
36 |
{
|
|
37 |
ESCPBWStateIdle,
|
|
38 |
ESCPBWStateGetPhonebookInfo,
|
|
39 |
ESCPBWStateGet3GPBInfo,
|
|
40 |
ESCPBWStateWrite,
|
|
41 |
ESCPBWStateDelete,
|
|
42 |
ESCPBWStateSimStoreNotSupported
|
|
43 |
};
|
|
44 |
|
|
45 |
public:
|
|
46 |
static CSCPBWCommandHandler* NewL(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone);
|
|
47 |
~CSCPBWCommandHandler();
|
|
48 |
|
|
49 |
private: // methods from CActive
|
|
50 |
virtual void RunL();
|
|
51 |
virtual void DoCancel();
|
|
52 |
|
|
53 |
private: // methods from CATCmdAsyncBase
|
|
54 |
virtual void HandleCommand( const TDesC8& aCmd, RBuf8& aReply, TBool aReplyNeeded );
|
|
55 |
|
|
56 |
private:
|
|
57 |
CSCPBWCommandHandler(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone);
|
|
58 |
void ConstructL();
|
|
59 |
|
|
60 |
TInt ParseParameters( TBool& aIsDeleteRequest );
|
|
61 |
TInt CreateContactEntry();
|
|
62 |
void ResetParameters();
|
|
63 |
void SetBuffer(TDes& aDest, const TDesC8& aSource);
|
|
64 |
|
|
65 |
private:
|
|
66 |
|
|
67 |
RMobilePhoneBookStore iPhoneBookStore;
|
|
68 |
CPhoneBookBuffer* iPhoneBookBuffer;
|
|
69 |
RMobilePhoneBookStore::TMobilePhoneBookInfoV1 iPhoneBookStoreInfo;
|
|
70 |
RMmCustomAPI iMmCustomAPI;
|
|
71 |
RMmCustomAPI::T3GPBInfo i3GPBInfo;
|
|
72 |
|
|
73 |
TInt iIndex;
|
|
74 |
RBuf iNum1;
|
|
75 |
TInt iType1;
|
|
76 |
RBuf iNum2;
|
|
77 |
TInt iType2;
|
|
78 |
RBuf iNum3;
|
|
79 |
TInt iType3;
|
|
80 |
RBuf iNum4;
|
|
81 |
TInt iType4;
|
|
82 |
RBuf iText;
|
|
83 |
TInt iCoding;
|
|
84 |
RBuf iEmail;
|
|
85 |
|
|
86 |
TInt iNumLength;
|
|
87 |
TInt iTextLength;
|
|
88 |
TInt iEmailLength;
|
|
89 |
TInt iMaxEntries;
|
|
90 |
|
|
91 |
RBuf8 iPbData;
|
|
92 |
|
|
93 |
TSCPBWState iState;
|
|
94 |
|
|
95 |
RBuf8 iReply;
|
|
96 |
|
|
97 |
};
|
|
98 |
|
|
99 |
#endif /* SCPBWCOMMANDHANDLER_H */
|