|
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 HSPINCOMINGCALLACCEPTANCE_H |
|
20 #define HSPINCOMINGCALLACCEPTANCE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "hspfeaturecommons.h" |
|
25 |
|
26 class CHsHSPCommand; |
|
27 class CHsHSPSettings; |
|
28 |
|
29 /** |
|
30 * @brief Represents "Accept an incoming voice call" feature |
|
31 */ |
|
32 class CHsHSPIncomingCallAcceptance : public CBase, |
|
33 public MHsHSPProcedureCommons |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Two-phased constructor. |
|
38 * |
|
39 * @param aObserver feature observer |
|
40 * |
|
41 * @return instance of class |
|
42 */ |
|
43 static CHsHSPIncomingCallAcceptance* NewL( |
|
44 MHsHSPFeatureProviderObserver* aObserver ); |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 * |
|
49 * @param aObserver feature observer |
|
50 * |
|
51 * @return instance of class |
|
52 */ |
|
53 static CHsHSPIncomingCallAcceptance* NewLC( |
|
54 MHsHSPFeatureProviderObserver* aObserver ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CHsHSPIncomingCallAcceptance(); |
|
60 |
|
61 public: |
|
62 //Methods inherited from MHsHSPProcedureCommons |
|
63 TInt ProcessCommand( const CHsHSPCommand* aInputCmd, |
|
64 CHsHSPCommand& aOutputCmd ); |
|
65 |
|
66 private: |
|
67 |
|
68 /** |
|
69 * Constructor for performing 1st stage construction |
|
70 * |
|
71 * @param aObserver feature observer |
|
72 */ |
|
73 CHsHSPIncomingCallAcceptance( MHsHSPFeatureProviderObserver* aObserver ); |
|
74 |
|
75 /** |
|
76 * Constructor for performing 2nd stage construction |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 private: |
|
81 /** |
|
82 * Checks if received command is proper +CKPD |
|
83 * |
|
84 * @param aCommand AT command |
|
85 * @return ETrue if command is AT+CKPD=200<cr><lf>, otherwise EFalse |
|
86 */ |
|
87 TBool IsCKPD200( const CHsHSPCommand* aCommand ); |
|
88 |
|
89 /** |
|
90 * Informs observer about procedure's completion |
|
91 * |
|
92 * @param aErr error value |
|
93 */ |
|
94 void InformObserver( TInt aErr ); |
|
95 |
|
96 private: |
|
97 |
|
98 /** Procedure's type */ |
|
99 const THSPProcedure iHSPProc = EHSPCallAccept; |
|
100 |
|
101 /** Pointer to observer, not owned */ |
|
102 MHsHSPFeatureProviderObserver* iObserver; |
|
103 |
|
104 /** Denotes if the next expected command is <cr><lf> OK <cr><lf> */ |
|
105 TBool iWaitingForOK; |
|
106 |
|
107 /** Denotes if the next expected command is AT+CKPD=200<cr><lf> */ |
|
108 TBool iWaitingForCKPD200; |
|
109 |
|
110 }; |
|
111 |
|
112 #endif // HSPINCOMINGCALLACCEPTANCE_H |