37
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2006 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: Header file for CTelDMCommandHandler class.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CTELDMCOMMANDHANDLER_H
|
|
20 |
#define CTELDMCOMMANDHANDLER_H
|
|
21 |
|
|
22 |
// INCLUDE FILES
|
|
23 |
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <aknkeylock.h>
|
|
26 |
#include "mteldmcallstateobserver.h"
|
|
27 |
|
|
28 |
// FORWARD DECLARATIONS
|
|
29 |
|
|
30 |
// CLASS DEFINITIONS
|
|
31 |
|
|
32 |
class MTelDMAcessory;
|
|
33 |
class MPhoneDeviceModeObserver;
|
|
34 |
class MTelDMAccessory;
|
|
35 |
class CTelDMCallStateListener;
|
|
36 |
/**
|
|
37 |
* Class for command
|
|
38 |
*
|
|
39 |
* @lib telephonydevicemode.dll
|
|
40 |
* @since 3.1
|
|
41 |
*/
|
|
42 |
NONSHARABLE_CLASS( CTelDMCommandHandler ): public CBase,
|
|
43 |
public MTelDMCallStateObserver
|
|
44 |
{
|
|
45 |
public: // constructor & destructor
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Two phase constructor
|
|
49 |
*/
|
|
50 |
static CTelDMCommandHandler* NewL( MPhoneDeviceModeObserver& aCallHandler,
|
|
51 |
MTelDMAccessory& aAccessory );
|
|
52 |
|
|
53 |
// Destructor
|
|
54 |
virtual ~CTelDMCommandHandler();
|
|
55 |
|
|
56 |
public:
|
|
57 |
|
|
58 |
enum TCommands
|
|
59 |
{
|
|
60 |
EGripOpen,
|
|
61 |
EGripClose
|
|
62 |
};
|
|
63 |
|
|
64 |
void HandleCommand( TCommands aCommand );
|
|
65 |
|
|
66 |
public: // from MTelDMCallStateObserver
|
|
67 |
|
|
68 |
/** See MTelDMCallStateObserver.h */
|
|
69 |
void CallStateChangedL( TInt aCallState );
|
|
70 |
|
|
71 |
|
|
72 |
private: // Constructor
|
|
73 |
|
|
74 |
/** c++ constructor */
|
|
75 |
CTelDMCommandHandler( MPhoneDeviceModeObserver& aCallHandler,
|
|
76 |
MTelDMAccessory& aAccessory );
|
|
77 |
|
|
78 |
/** 2nd phase constructor */
|
|
79 |
void ConstructL();
|
|
80 |
|
|
81 |
private:
|
|
82 |
|
|
83 |
/**
|
|
84 |
* Ends calls
|
|
85 |
*/
|
|
86 |
void EndCalls();
|
|
87 |
|
|
88 |
/**
|
|
89 |
* Offer key lock query.
|
|
90 |
*/
|
|
91 |
void OfferKeyLock();
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Check emergency call
|
|
95 |
* @return status of emergency call
|
|
96 |
*/
|
|
97 |
TBool IsEmergencyCall() const;
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Check soft reject
|
|
101 |
* @return status of soft reject operation
|
|
102 |
*/
|
|
103 |
TBool IsSoftRejectOngoing() const;
|
|
104 |
|
|
105 |
private:
|
|
106 |
|
|
107 |
// Reference to device mode observer
|
|
108 |
MPhoneDeviceModeObserver& iCallHandler;
|
|
109 |
|
|
110 |
// Reference to accessory listene
|
|
111 |
MTelDMAccessory& iAccessory;
|
|
112 |
|
|
113 |
// For keypad locking.
|
|
114 |
RAknKeyLock iKeyLock;
|
|
115 |
|
|
116 |
// Is grip open ?
|
|
117 |
TBool iGripOpen;
|
|
118 |
|
|
119 |
// Grip open when ringing state ?
|
|
120 |
TBool iGripOpenOnRingingState;
|
|
121 |
|
|
122 |
// Call state
|
|
123 |
TInt iCallState;
|
|
124 |
|
|
125 |
};
|
|
126 |
|
|
127 |
#endif // CTELDMCOMMANDHANDLER_H
|
|
128 |
|
|
129 |
// end of file
|