1 /* |
|
2 * Copyright (c) 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: Device mode handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CPEDEVICEMODEHANDLER_H |
|
21 #define CPEDEVICEMODEHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <mphonedevicemodeobserver.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MPECallHandling; |
|
29 class CPEMessageHandler; |
|
30 class CTelDMHandler; |
|
31 |
|
32 |
|
33 /** |
|
34 * Device mode handler. |
|
35 */ |
|
36 NONSHARABLE_CLASS( CPEDeviceModeHandler ) : public CBase, public MPhoneDeviceModeObserver |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * @return Pointer to created CPEDeviceModeHandler instance. |
|
43 */ |
|
44 static CPEDeviceModeHandler* NewL( |
|
45 MPECallHandling& aCallHandling, |
|
46 CPEMessageHandler& aMessageHandler ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CPEDeviceModeHandler(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 protected: |
|
56 |
|
57 /** |
|
58 * @see MPhoneDeviceModeObserver |
|
59 */ |
|
60 void Answer(); |
|
61 |
|
62 /** |
|
63 * @see MPhoneDeviceModeObserver |
|
64 */ |
|
65 void EndVoiceCalls(); |
|
66 |
|
67 |
|
68 private: // Constructors |
|
69 |
|
70 /** |
|
71 * Constructor. |
|
72 */ |
|
73 CPEDeviceModeHandler( |
|
74 MPECallHandling& aCallHandling, |
|
75 CPEMessageHandler& aMessageHandler ); |
|
76 |
|
77 /** |
|
78 * By default Symbian 2nd phase constructor is private. |
|
79 */ |
|
80 void ConstructL(); |
|
81 |
|
82 /** |
|
83 * Loads Telephony Device mode library. |
|
84 */ |
|
85 void LoadLibraryL(); |
|
86 |
|
87 private: // Data |
|
88 |
|
89 // Library loader. |
|
90 RLibrary iLibrary; |
|
91 |
|
92 // MPECallHandling handles call related commands to CallHandling subsystem. |
|
93 MPECallHandling& iCallHandling; |
|
94 |
|
95 // CPEMessageHandler object which handles messages |
|
96 CPEMessageHandler& iMessageHandler; |
|
97 |
|
98 // TelDeviceMode instance. |
|
99 CTelDMHandler* iTelDevModeHandler; |
|
100 |
|
101 }; |
|
102 |
|
103 #endif // CPEDEVICEMODEHANDLER_H |
|
104 |
|
105 // End of File |
|