|
1 /* |
|
2 * Copyright (c) 2002-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: Play Tone command handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPLAYTONEHANDLER_H |
|
20 #define CPLAYTONEHANDLER_H |
|
21 |
|
22 #include <etelsat.h> |
|
23 |
|
24 #include "CSatCommandHandler.h" |
|
25 |
|
26 class MSatUtils; |
|
27 |
|
28 /** |
|
29 * Command handler for SelectItem command. |
|
30 * |
|
31 * @lib PlayToneCmd.lib |
|
32 * @since S60 v3.0 |
|
33 */ |
|
34 class CPlayToneHandler : public CSatCommandHandler |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 static CPlayToneHandler* NewL( MSatUtils* aUtils ); |
|
40 |
|
41 virtual ~CPlayToneHandler(); |
|
42 |
|
43 // from base class MSatCommand |
|
44 |
|
45 /** |
|
46 * From MSatCommand. |
|
47 * Response from the client. |
|
48 * |
|
49 */ |
|
50 void ClientResponse(); |
|
51 |
|
52 protected: |
|
53 |
|
54 // from base class CActive |
|
55 |
|
56 /** |
|
57 * From CActive. |
|
58 * Cancels the usat request |
|
59 * |
|
60 */ |
|
61 void DoCancel(); |
|
62 |
|
63 /** |
|
64 * From CSatCommandHandler |
|
65 * Requests the command notification. |
|
66 * |
|
67 * @param aStatus Request status |
|
68 */ |
|
69 void IssueUSATRequest( TRequestStatus& aStatus ); |
|
70 |
|
71 /** |
|
72 * From CSatCommandHandler |
|
73 * Precheck before executing the command. |
|
74 * |
|
75 * @return TBool indicating command is currently allowed. |
|
76 */ |
|
77 TBool CommandAllowed(); |
|
78 |
|
79 /** |
|
80 * From CSatCommandHandler |
|
81 * Need for ui session. |
|
82 * |
|
83 * @return TBool indicating need of ui session. |
|
84 */ |
|
85 TBool NeedUiSession(); |
|
86 |
|
87 /** |
|
88 * From CSatCommandHandler |
|
89 * Called when USAT API notifies that command. |
|
90 * |
|
91 */ |
|
92 void HandleCommand(); |
|
93 |
|
94 /** |
|
95 * From CSatCommandHandler. |
|
96 * Indicates the failure of launching ui client. |
|
97 * |
|
98 */ |
|
99 void UiLaunchFailed(); |
|
100 |
|
101 private: |
|
102 |
|
103 CPlayToneHandler(); |
|
104 |
|
105 void ConstructL(); |
|
106 |
|
107 private: // data |
|
108 |
|
109 /** |
|
110 * The data structure for the command data. |
|
111 */ |
|
112 RSat::TPlayToneV2 iPlayToneData; |
|
113 |
|
114 /** |
|
115 * The data package for IPC. |
|
116 */ |
|
117 RSat::TPlayToneV2Pckg iPlayTonePckg; |
|
118 |
|
119 /** |
|
120 * the response. |
|
121 */ |
|
122 RSat::TPlayToneRspV1 iPlayToneRsp; |
|
123 |
|
124 /** |
|
125 * the response package. |
|
126 */ |
|
127 RSat::TPlayToneRspV1Pckg iPlayToneRspPckg; |
|
128 |
|
129 /** |
|
130 * Flag to signal that command has icon data. |
|
131 *To be removed when icons are allowed in this command. |
|
132 */ |
|
133 TBool iIconCommand; |
|
134 |
|
135 }; |
|
136 |
|
137 #endif // CPLAYTONEHANDLER_H |
|
138 |