60
|
1 |
/*
|
|
2 |
*
|
|
3 |
* Copyright (c) <2010> Comarch S.A. and/or its subsidiary(-ies).
|
|
4 |
* All rights reserved.
|
|
5 |
* This component and the accompanying materials are made available
|
|
6 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
7 |
* which accompanies this distribution, and is available
|
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
9 |
*
|
|
10 |
* Original Contributors:
|
|
11 |
* Comarch S.A. - original contribution.
|
|
12 |
*
|
|
13 |
* Contributors:
|
|
14 |
*
|
|
15 |
* Description:
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef HFFEATUREMANAGER_H_
|
|
20 |
#define HFFEATUREMANAGER_H_
|
|
21 |
|
|
22 |
#include "hfpfeaturecommons.h"
|
|
23 |
#include "hfpsettings.h"
|
|
24 |
|
|
25 |
class CHsHFPCommand;
|
|
26 |
class CHsHFPConnectionManagement;
|
|
27 |
class CHsHFPCallTerminationProc;
|
|
28 |
class CHsHFPIncomingCallAcceptance;
|
|
29 |
class CHsHFPIncomingCallRejection;
|
|
30 |
class CHsHFPPhoneStatusInformation;
|
|
31 |
class CHsHFPRemoteAudioVolumeControl;
|
|
32 |
class CHsHFPLastNumberRedialing;
|
|
33 |
class CHsHFPPhoneNumberDialing;
|
|
34 |
class CHsHFPCallingLineIdentification;
|
|
35 |
|
|
36 |
/**
|
|
37 |
* @brief Manages features supported by profile.
|
|
38 |
*
|
|
39 |
* Delegates data handling to appropriate procedure and holds current state.
|
|
40 |
*/
|
|
41 |
class CHsHFPFeatureManager : public CBase,
|
|
42 |
public MHsHFPFeatureProviderObserver
|
|
43 |
{
|
|
44 |
public:
|
|
45 |
/**
|
|
46 |
* Two-phased constructor.
|
|
47 |
*
|
|
48 |
* @return instance of class
|
|
49 |
*/
|
|
50 |
static CHsHFPFeatureManager* NewL();
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Two-phased constructor.
|
|
54 |
*
|
|
55 |
* @return instance of class
|
|
56 |
*/
|
|
57 |
static CHsHFPFeatureManager* NewLC();
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Destructor
|
|
61 |
*/
|
|
62 |
~CHsHFPFeatureManager();
|
|
63 |
|
|
64 |
public:
|
|
65 |
/**
|
|
66 |
* Decides which feature's procedure should be started.
|
|
67 |
*
|
|
68 |
* @param aATCommandIn input AT command
|
|
69 |
* @param aATCommandOut response
|
|
70 |
*/
|
|
71 |
void PerformDataProcessingL(const CHsHFPCommand* aATCommandIn,
|
|
72 |
CHsHFPCommand& aATCommandOut);
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Handles AG client disconnection event
|
|
76 |
*
|
|
77 |
* @param aErr disconnection reason
|
|
78 |
*/
|
|
79 |
void HandleClientDisconnected(TInt aErr);
|
|
80 |
|
|
81 |
/**
|
|
82 |
* Handles AG client connection event
|
|
83 |
*
|
|
84 |
* @param aCommandOut AT response
|
|
85 |
*/
|
|
86 |
void HandleClientConnectedL(TDes8& aCommandOut);
|
|
87 |
|
|
88 |
public:
|
|
89 |
//Method inherited from MHsHFPFeatureProviderObserver
|
|
90 |
void HandleProcedureCompleted(TInt aErr);
|
|
91 |
|
|
92 |
private:
|
|
93 |
/**
|
|
94 |
* Constructor for performing 1st stage construction
|
|
95 |
*/
|
|
96 |
CHsHFPFeatureManager();
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Constructor for performing 2nd stage construction
|
|
100 |
*/
|
|
101 |
void ConstructL();
|
|
102 |
|
|
103 |
/**
|
|
104 |
* Handles OK command.
|
|
105 |
*
|
|
106 |
* @param aATCommandIn input AT command
|
|
107 |
* @param aATCommandOut response
|
|
108 |
*/
|
|
109 |
void HandleOKCommandL(const CHsHFPCommand* aATCommandIn,
|
|
110 |
CHsHFPCommand& aATCommandOut);
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Handles CIEV command and saves current value of appropriate indicator.
|
|
114 |
*
|
|
115 |
* @param aATCommandIn input AT command
|
|
116 |
* @param aATCommandOut response
|
|
117 |
*/
|
|
118 |
void HandleCIEVCommandL(const CHsHFPCommand* aATCommandIn,
|
|
119 |
CHsHFPCommand& aATCommandOut);
|
|
120 |
|
|
121 |
private:
|
|
122 |
/** HFP procedures */
|
|
123 |
enum THFPProcedures
|
|
124 |
{
|
|
125 |
EHFPServiceLevelConnectionEstablishment,
|
|
126 |
EHFPServiceLevelConnectionRelease,
|
|
127 |
EHFPCallTerminate,
|
|
128 |
EHFPCallAccept,
|
|
129 |
EHFPCallReject,
|
|
130 |
EHFPOperatorSelection,
|
|
131 |
EHFPVolumeControl,
|
|
132 |
EHFPLastNumberRedialing,
|
|
133 |
EHFPPhoneNumberDialing,
|
|
134 |
EHFPCallingLineIdentification,
|
|
135 |
EHFPIdle
|
|
136 |
};
|
|
137 |
|
|
138 |
/** Ongoing procedure */
|
|
139 |
THFPProcedures iProcedureStarted;
|
|
140 |
|
|
141 |
/** Denotes if service level connection is established */
|
|
142 |
TBool iSrvLvlConnEstablished;
|
|
143 |
|
|
144 |
/** Connection managment feature */
|
|
145 |
CHsHFPConnectionManagement* iConnectionManagement;
|
|
146 |
|
|
147 |
/** Terminate a call feature */
|
|
148 |
CHsHFPCallTerminationProc* iCallTermProc;
|
|
149 |
|
|
150 |
/** Accept an incoming voice call feature */
|
|
151 |
CHsHFPIncomingCallAcceptance* iCallAcceptProc;
|
|
152 |
|
|
153 |
/** Reject an incoming voice call feature */
|
|
154 |
CHsHFPIncomingCallRejection* iCallRejectProc;
|
|
155 |
|
|
156 |
/** Phone status information feature */
|
|
157 |
CHsHFPPhoneStatusInformation* iPhoneStatus;
|
|
158 |
|
|
159 |
/** Remote audio volume control feature */
|
|
160 |
CHsHFPRemoteAudioVolumeControl* iVolumeControl;
|
|
161 |
|
|
162 |
/** Place a call to the last number dialed feature */
|
|
163 |
CHsHFPLastNumberRedialing* iLastNumberRedialing;
|
|
164 |
|
|
165 |
/** Place a call with a phone number supplied by the HF feature */
|
|
166 |
CHsHFPPhoneNumberDialing* iPhoneNumberDialing;
|
|
167 |
|
|
168 |
/** Calling Line Identification feature */
|
|
169 |
CHsHFPCallingLineIdentification* iCallingLineIdentification;
|
|
170 |
};
|
|
171 |
|
|
172 |
#endif /* HFFEATUREMANAGER_H_ */
|