|
1 /* |
|
2 * Copyright (c) 2006-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: CVibraActionPlugIn class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_VIBRAACTIONPLUGIN_H |
|
21 #define C_VIBRAACTIONPLUGIN_H |
|
22 |
|
23 #include <cfactionplugin.h> |
|
24 |
|
25 #include "vibraactionobserver.h" |
|
26 |
|
27 class CVibraAction; |
|
28 |
|
29 /** |
|
30 * Vibra action plug-in. |
|
31 * Vibra action can start and stop vibra. Starting can be configured |
|
32 * via interval and intensity. |
|
33 * |
|
34 * @lib - |
|
35 * @since S60 4.0 |
|
36 */ |
|
37 NONSHARABLE_CLASS( CVibraActionPlugIn ): public CCFActionPlugIn, |
|
38 public MVibraActionObserver |
|
39 { |
|
40 public: |
|
41 |
|
42 // Two phased constructors |
|
43 static CVibraActionPlugIn* NewL(); |
|
44 static CVibraActionPlugIn* NewLC(); |
|
45 |
|
46 // Destructor |
|
47 ~CVibraActionPlugIn(); |
|
48 |
|
49 private: // From base classes |
|
50 |
|
51 // @see CCFActionPlugIn |
|
52 void InitializeL(); |
|
53 |
|
54 // @see CCFActionPlugIn |
|
55 TExecutionTime ExecuteL( CCFActionIndication* aActionIndication ); |
|
56 |
|
57 // @see CCFActionPlugIn |
|
58 void GetActionsL( CDesCArray& aActionList ) const; |
|
59 |
|
60 // @see CCFActionPlugIn |
|
61 const TSecurityPolicy& SecurityPolicy() const; |
|
62 |
|
63 // @see MVibraActionObserver |
|
64 void VibraActionCompletedL(); |
|
65 |
|
66 private: // New methods |
|
67 |
|
68 // Converts string to int |
|
69 TInt ConvertToInt( const TDesC& aDesc ) const; |
|
70 |
|
71 private: |
|
72 |
|
73 CVibraActionPlugIn(); |
|
74 |
|
75 private: // Data |
|
76 |
|
77 /** Vibra controller */ |
|
78 CVibraAction* iVibraAction; |
|
79 }; |
|
80 |
|
81 #endif |