|
1 /* |
|
2 * Copyright (c) 2005 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: Concrete session class for Telephony Device Mode |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CTELDMGRIPHANDLER_H |
|
21 #define CTELDMGRIPHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32property.h> |
|
26 #include <e32base.h> |
|
27 |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class MPhoneDeviceModeObserver; |
|
32 class MTelDMAccessory; |
|
33 class CTelDMCommandHandler; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Concrete session class for Telephony Device Mode |
|
39 * |
|
40 * @since 3.0 |
|
41 */ |
|
42 |
|
43 NONSHARABLE_CLASS( CTelDMGripHandler ) : public CActive |
|
44 { |
|
45 public: // Constructors and destructors. |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 */ |
|
50 static CTelDMGripHandler* NewL( CTelDMCommandHandler& aCommandHandler ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CTelDMGripHandler(); |
|
56 |
|
57 public: // New functions |
|
58 |
|
59 public: // Functions from base classes |
|
60 |
|
61 private: // Functions from base classes |
|
62 |
|
63 /** |
|
64 * @see CActive::RunL. |
|
65 */ |
|
66 void RunL(); |
|
67 |
|
68 /** |
|
69 * @see CActive::DoCancel. |
|
70 */ |
|
71 void DoCancel(); |
|
72 |
|
73 private: |
|
74 |
|
75 /** |
|
76 * Handle notification request |
|
77 */ |
|
78 void HandleChange(); |
|
79 |
|
80 /** |
|
81 * Start notification. |
|
82 */ |
|
83 void IssueRequest(); |
|
84 |
|
85 /** |
|
86 * Constructor. |
|
87 */ |
|
88 CTelDMGripHandler( CTelDMCommandHandler& aCommandHandler ); |
|
89 |
|
90 /** |
|
91 * Symbian OS constructor. |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 /** |
|
96 * Check phone settings |
|
97 * @return Status of settings value |
|
98 */ |
|
99 TBool IsSliderCallAnswer() const; |
|
100 |
|
101 /** |
|
102 * Check phone settings |
|
103 * @return Status of settings value |
|
104 */ |
|
105 TBool IsSliderCallEnd()const; |
|
106 |
|
107 /** |
|
108 * Get integer value of setting |
|
109 * @param aUid identifing the central repository UID. |
|
110 * @param aId central repository ID. |
|
111 * @param aValue the value associated with the central repository ID |
|
112 * @return |
|
113 */ |
|
114 TInt CTelDMGripHandler::GetInt( |
|
115 const TUid& aUid, |
|
116 const TUint aId, |
|
117 TInt& aValue ) const; |
|
118 |
|
119 private: |
|
120 // Owned Publish & Subscribe instance. |
|
121 RProperty iProperty; |
|
122 |
|
123 // Reference to commander |
|
124 CTelDMCommandHandler& iCommandHandler; |
|
125 |
|
126 |
|
127 }; |
|
128 |
|
129 #endif // CTELDMGRIPHANDLER_H |
|
130 |
|
131 // End of File |