|
1 /* |
|
2 * Copyright (c) 2008 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: Session class for Tactile Feedback server. |
|
15 * Part of: Tactile Feedback. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef C_TACTILEFEEDBACKSESSION_H |
|
21 #define C_TACTILEFEEDBACKSESSION_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class CTactileFeedbackSrv; |
|
26 |
|
27 /** |
|
28 * Session class for Tactile Feedback server. |
|
29 * |
|
30 * @since S60 5.2 |
|
31 */ |
|
32 class CTactileFeedbackSession : public CSession2 |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * C++ constructor. |
|
37 */ |
|
38 CTactileFeedbackSession(); |
|
39 |
|
40 /** |
|
41 * From CSession2, passes the request forward to DispatchMessageL. |
|
42 * @since S60 5.2 |
|
43 * @param aMessage, a message from client. |
|
44 */ |
|
45 void ServiceL( const RMessage2& aMessage ); |
|
46 |
|
47 /** |
|
48 * Handles the request from client. |
|
49 * @since S60 5.2 |
|
50 * @param aMessage, a message from client. |
|
51 */ |
|
52 void DispatchMessageL( const RMessage2& aMessage ); |
|
53 |
|
54 /** |
|
55 * From CSession2, adds session to server's counter. |
|
56 * @since S60 5.2 |
|
57 */ |
|
58 void CreateL(); |
|
59 |
|
60 private: |
|
61 /** |
|
62 * Play feedback. |
|
63 */ |
|
64 void PlayFeedback( const RMessage2& aMessage ); |
|
65 |
|
66 /** |
|
67 * Start continuous feedback. |
|
68 */ |
|
69 void StartFeedback( const RMessage2& aMessage ); |
|
70 |
|
71 /** |
|
72 * Modify continuous feedback. |
|
73 */ |
|
74 void ModifyFeedback( const RMessage2& aMessage ); |
|
75 |
|
76 /** |
|
77 * Stop continuous feedback. |
|
78 */ |
|
79 void StopFeedback( const RMessage2& aMessage ); |
|
80 |
|
81 /** |
|
82 * Set feedback enabled/disabled for the device. |
|
83 */ |
|
84 void SetFBEnabledForDeviceL( const RMessage2& aMessage ); |
|
85 |
|
86 /** |
|
87 * Get feedback enabled/disabled state. |
|
88 */ |
|
89 void FeedbackEnabledForDeviceL( const RMessage2& aMessage ); |
|
90 |
|
91 /** |
|
92 * Play preview feedback. |
|
93 */ |
|
94 void PlayPreviewFeedback( const RMessage2& aMessage ); |
|
95 |
|
96 /** |
|
97 * Start preview of continuous feedback. |
|
98 */ |
|
99 void StartPreviewFeedback( const RMessage2& aMessage ); |
|
100 |
|
101 /** |
|
102 * Modify preview of continuous feedback. |
|
103 */ |
|
104 void ModifyPreviewFeedback( const RMessage2& aMessage ); |
|
105 |
|
106 /** |
|
107 * Stop preview of continuous feedback. |
|
108 */ |
|
109 void StopPreviewFeedback( const RMessage2& aMessage ); |
|
110 |
|
111 private: |
|
112 /** |
|
113 * C++ destructor. |
|
114 */ |
|
115 virtual ~CTactileFeedbackSession(); |
|
116 |
|
117 /* |
|
118 * Reference to Tactile Feedback Server. |
|
119 */ |
|
120 CTactileFeedbackSrv& Server(); |
|
121 |
|
122 private: |
|
123 /** |
|
124 * This flag is used for making sure that continuous feedback |
|
125 * is stopped if the client, which started it, is closed. |
|
126 */ |
|
127 TBool iFeedbackStarted; |
|
128 }; |
|
129 |
|
130 #endif // C_TACTILEFEEDBACKSESSION_H |
|
131 |
|
132 // End of file. |