|
1 /* |
|
2 * Copyright (c) 2007 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: Control class of Tilt Compensation SSY. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef TCSSYCONTROL_H |
|
21 #define TCSSYCONTROL_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <ssycontrol.h> |
|
25 |
|
26 #include "tcchannel.h" |
|
27 #include "common.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class MSsyCallback; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * SSY plug-in implementation for Tilt Compensation plug-in. |
|
36 * |
|
37 * @lib None |
|
38 * @since S60 5.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CTCSsyControl ): public CSsyControl |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Two phased constructor. |
|
46 * |
|
47 * @param aSsyCallback Callback class from sensor server |
|
48 * @return CTCSsyControl |
|
49 */ |
|
50 static CTCSsyControl* NewL( MSsyCallback* aSsyCallback ); |
|
51 |
|
52 /** |
|
53 * Destructor |
|
54 */ |
|
55 ~CTCSsyControl(); |
|
56 |
|
57 private: // From CSsyControl |
|
58 |
|
59 // @see CSsyControl |
|
60 void OpenChannelL( TSensrvChannelId aChannelId ); |
|
61 |
|
62 // @see CSsyControl |
|
63 void CloseChannelL( TSensrvChannelId aChannelId ); |
|
64 |
|
65 private: |
|
66 |
|
67 // Is channel supported |
|
68 CTCChannel* ChannelSupported( TSensrvChannelId aChannelId ) const; |
|
69 |
|
70 private: |
|
71 |
|
72 // Default C++ constructor |
|
73 CTCSsyControl(); |
|
74 |
|
75 // Constructor |
|
76 void ConstructL( MSsyCallback* aSsyCallback ); |
|
77 |
|
78 private: // Data |
|
79 |
|
80 /** Channels supported by Tilt SSY */ |
|
81 RChannelArray iChannels; |
|
82 }; |
|
83 |
|
84 #endif // TCSSYCONTROL_H |
|
85 |
|
86 // End of File |