|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // @file atphbkgetphonestoreinfo.h |
|
15 // This contains CAtPhbkGetPhoneStoreInfo which is used to get phonebook information |
|
16 // |
|
17 |
|
18 #ifndef ATPHBKGETPHONESTOREINFO_H |
|
19 #define ATPHBKGETPHONESTOREINFO_H |
|
20 |
|
21 //system include |
|
22 #include <etelmm.h> |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 |
|
26 //user include |
|
27 #include "atcommandbase.h" |
|
28 |
|
29 /** |
|
30 * CAtPhbkGetPhoneStoreInfo |
|
31 * |
|
32 */ |
|
33 class CAtPhbkGetPhoneStoreInfo : public CAtCommandBase |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Destructor |
|
38 * |
|
39 */ |
|
40 ~CAtPhbkGetPhoneStoreInfo(); |
|
41 |
|
42 /** |
|
43 * static NewL |
|
44 * |
|
45 * @param aGloblePhone |
|
46 * @param aCtsyDispatcherCallback |
|
47 */ |
|
48 static CAtPhbkGetPhoneStoreInfo* NewL(CGlobalPhonemanager& aGloblePhone, |
|
49 CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
50 |
|
51 /** |
|
52 * static NewLC |
|
53 * |
|
54 * @param aGloblePhone |
|
55 * @param aCtsyDispatcherCallback |
|
56 */ |
|
57 static CAtPhbkGetPhoneStoreInfo* NewLC(CGlobalPhonemanager& aGloblePhone, |
|
58 CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
59 |
|
60 /** |
|
61 * Virtual function. Inherited from CAtCommandBase |
|
62 * Start Execute AT Command |
|
63 */ |
|
64 virtual void ExecuteCommand(); |
|
65 |
|
66 /** |
|
67 * Will be called by AT Manager whenever a event was triggered |
|
68 * |
|
69 * @param aEventSource |
|
70 * @param aStatus |
|
71 */ |
|
72 virtual void EventSignal(TAtEventSource aEventSource, TInt aStatus); |
|
73 |
|
74 /** |
|
75 * Virtual function. Inherited from CAtCommandBase |
|
76 * |
|
77 * @param aResponseBuf Line buf reading from baseband |
|
78 */ |
|
79 virtual void ParseResponseL(const TDesC8& aResponseBuf); |
|
80 |
|
81 /** |
|
82 * Start this request |
|
83 * |
|
84 */ |
|
85 void StartRequest(); |
|
86 |
|
87 /** |
|
88 * Set PhoneStoreParam by handler |
|
89 * |
|
90 * @param aStoreName |
|
91 */ |
|
92 void SetPhoneStoreParam(const TDesC& aStoreName); |
|
93 private: |
|
94 /** |
|
95 * Constructor |
|
96 * |
|
97 * @param aGloblePhone |
|
98 * @param aCtsyDispatcherCallback |
|
99 */ |
|
100 CAtPhbkGetPhoneStoreInfo(CGlobalPhonemanager& aGloblePhone, |
|
101 CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
102 |
|
103 /** |
|
104 * 2nd Constructor |
|
105 */ |
|
106 void ConstructL(); |
|
107 |
|
108 /** |
|
109 * Executer AT command for getting Phone Store Info |
|
110 */ |
|
111 void GetPhoneStoreInfo(); |
|
112 private: |
|
113 /** |
|
114 * save the iStoreName by SetPhoneStoreParam |
|
115 */ |
|
116 TBuf<8> iStoreName; |
|
117 |
|
118 /** |
|
119 * phonestoreinfo for callback |
|
120 */ |
|
121 RMobilePhoneStore::TMobilePhoneStoreInfoV1 iPhoneStoreInfo; |
|
122 |
|
123 /** |
|
124 * state machine for EventSignal |
|
125 */ |
|
126 enum |
|
127 { |
|
128 ESetIccSmsStore, |
|
129 ESetIccSmsStoreComplete, |
|
130 ESetPhoneStore, |
|
131 ESetPhoneStoreComplete, |
|
132 EGetPhoneStoreInfo, |
|
133 EGetPhoneStoreInfoComplete, |
|
134 EATNotInProgress |
|
135 }iState; |
|
136 |
|
137 /** |
|
138 * The return error value of AT command executed |
|
139 */ |
|
140 TInt iError; |
|
141 |
|
142 }; // class CAtPhbkGetPhoneStoreInfo |
|
143 |
|
144 #endif // ATPHBKGETPHONESTOREINFO_H |