|
1 /* |
|
2 * Copyright (c) 2010 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: Interface for signal strength handler. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MSIGNALSTRENGTHHANDLER_H |
|
21 #define MSIGNALSTRENGTHHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MSignalStrengthObserver; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Interface for a class which handles changes |
|
33 * in phone signal strength. |
|
34 */ |
|
35 class MSignalStrengthHandler |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Destructor. |
|
41 */ |
|
42 virtual ~MSignalStrengthHandler() {}; |
|
43 |
|
44 public: // New functions |
|
45 |
|
46 /** |
|
47 * Returns ETrue if signal observing is supported, EFalse otherwise. |
|
48 * @return ETrue if signal observing is supported, EFalse otherwise. |
|
49 */ |
|
50 virtual TBool ObservingSupported() = 0; |
|
51 |
|
52 /** |
|
53 * Returns ETrue if signal strength requests are supported, EFalse otherwise. |
|
54 * @return ETrue if signal strength requests are supported, EFalse otherwise. |
|
55 */ |
|
56 virtual TBool RequestsSupported() = 0; |
|
57 |
|
58 /** |
|
59 * Sets the signal strength observer. May leave with KErrNotSupported |
|
60 * if signal strength observing is not supported. |
|
61 * @param aObserver Observer for signal strength. Ownership is not passed. |
|
62 */ |
|
63 virtual void SetSignalStrengthObserverL( MSignalStrengthObserver* aObserver ) = 0; |
|
64 |
|
65 /** |
|
66 * Starts observing the signal strength. May leave with KErrNotSupported |
|
67 * if signal strength observing is not supported. |
|
68 */ |
|
69 virtual void StartObservingL() = 0; |
|
70 |
|
71 /** |
|
72 * Stops the signal strength observing. |
|
73 */ |
|
74 virtual void StopObservingL() = 0; |
|
75 |
|
76 /** |
|
77 * Returns the current signal strength. May leave with KErrNotSupported |
|
78 * if signal strength requests are not supported. |
|
79 * @return The current signal strength. |
|
80 */ |
|
81 virtual TInt SignalStrengthL() = 0; |
|
82 |
|
83 /** |
|
84 * Returns the current bar value. May leave with KErrNotSupported |
|
85 * if bar value requests are not supported. |
|
86 * @return The current signal strength. |
|
87 */ |
|
88 virtual TInt BarValueL() = 0; |
|
89 |
|
90 }; |
|
91 |
|
92 #endif // MSIGNALSTRENGTHHANDLER_H |
|
93 |
|
94 // End of File |