38 * |
38 * |
39 * @lib telephonydevicemode.dll |
39 * @lib telephonydevicemode.dll |
40 * @since 3.1 |
40 * @since 3.1 |
41 */ |
41 */ |
42 NONSHARABLE_CLASS( CTelDMCommandHandler ): public CBase, |
42 NONSHARABLE_CLASS( CTelDMCommandHandler ): public CBase, |
43 public MTelDMCallStateObserver |
43 public MTelDMCallStateObserver |
44 { |
44 { |
45 public: // constructor & destructor |
45 public: // constructor & destructor |
46 |
46 |
47 /** |
47 /** |
48 * Two phase constructor |
48 * Two phase constructor |
49 */ |
49 */ |
50 static CTelDMCommandHandler* NewL( MPhoneDeviceModeObserver& aCallHandler, |
50 static CTelDMCommandHandler* NewL( MPhoneDeviceModeObserver& aCallHandler, |
51 MTelDMAccessory& aAccessory ); |
51 MTelDMAccessory& aAccessory ); |
52 |
52 |
53 // Destructor |
53 // Destructor |
54 virtual ~CTelDMCommandHandler(); |
54 virtual ~CTelDMCommandHandler(); |
55 |
55 |
56 public: |
56 public: |
57 |
57 |
58 enum TCommands |
58 enum TCommands |
59 { |
59 { |
60 EGripOpen, |
60 EGripOpen, |
61 EGripClose |
61 EGripClose |
62 }; |
62 }; |
63 |
63 |
64 void HandleCommand( TCommands aCommand ); |
64 void HandleCommand( TCommands aCommand ); |
65 |
65 |
66 public: // from MTelDMCallStateObserver |
66 public: // from MTelDMCallStateObserver |
67 |
67 |
68 /** See MTelDMCallStateObserver.h */ |
68 /** See MTelDMCallStateObserver.h */ |
69 void CallStateChangedL( TInt aCallState ); |
69 void CallStateChangedL( TInt aCallState ); |
70 |
70 |
71 |
71 |
72 private: // Constructor |
72 private: // Constructor |
73 |
73 |
74 /** c++ constructor */ |
74 /** c++ constructor */ |
75 CTelDMCommandHandler( MPhoneDeviceModeObserver& aCallHandler, |
75 CTelDMCommandHandler( MPhoneDeviceModeObserver& aCallHandler, |
76 MTelDMAccessory& aAccessory ); |
76 MTelDMAccessory& aAccessory ); |
77 |
77 |
78 /** 2nd phase constructor */ |
78 /** 2nd phase constructor */ |
79 void ConstructL(); |
79 void ConstructL(); |
80 |
80 |
81 private: |
81 private: |
82 |
82 |
83 /** |
83 /** |
84 * Ends calls |
84 * Ends calls |
85 */ |
85 */ |
86 void EndCalls(); |
86 void EndCalls(); |
87 |
87 |
88 /** |
88 /** |
89 * Offer key lock query. |
89 * Offer key lock query. |
90 */ |
90 */ |
91 void OfferKeyLock(); |
91 void OfferKeyLock(); |
92 |
92 |
93 /** |
93 /** |
94 * Check emergency call |
94 * Check emergency call |
95 * @return status of emergency call |
95 * @return status of emergency call |
96 */ |
96 */ |
97 TBool IsEmergencyCall() const; |
97 TBool IsEmergencyCall() const; |
98 |
98 |
99 /** |
99 /** |
100 * Check soft reject |
100 * Check soft reject |
101 * @return status of soft reject operation |
101 * @return status of soft reject operation |
102 */ |
102 */ |
103 TBool IsSoftRejectOngoing() const; |
103 TBool IsSoftRejectOngoing() const; |
104 |
104 |
105 private: |
105 private: |
106 |
106 |
107 // Reference to device mode observer |
107 // Reference to device mode observer |
108 MPhoneDeviceModeObserver& iCallHandler; |
108 MPhoneDeviceModeObserver& iCallHandler; |
109 |
109 |
110 // Reference to accessory listene |
110 // Reference to accessory listene |
111 MTelDMAccessory& iAccessory; |
111 MTelDMAccessory& iAccessory; |
112 |
112 |
113 // For keypad locking. |
113 // For keypad locking. |
114 RAknKeyLock iKeyLock; |
114 RAknKeyLock iKeyLock; |
115 |
115 |