2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Container for composit feedback types.
15 * Part of: Tactile Feedback.
19 #ifndef C_FEEDBACKSPEC_H
20 #define C_FEEDBACKSPEC_H
23 #include <touchlogicalfeedback.h>
26 // Container for one event/feedback type pair
29 TTouchEventType iEventType;
30 TTouchLogicalFeedback iFeedback;
31 TTouchFeedbackType iFeedbackType;
35 * Contains feedback types used for setting feedback area
37 * This class acts as container for event/feedback type pairs. These pairs
38 * define what kind of feedback is producent when area is touched.
40 * @lib touchfeedback.lib
43 class CFeedbackSpec: public CBase
47 * Instantiation method.
50 * @return New CFeedbackSpec instance.
52 IMPORT_C static CFeedbackSpec* New();
59 virtual ~CFeedbackSpec();
62 * Adds event/feedback type pair to feedback spec
65 * @param aEventType - Touch event type.
66 * @param aFeedback - Logical feedback type.
67 * @return KErrNone, or one of standard Symbian OS error codes.
69 IMPORT_C TInt AddFeedback( TTouchEventType aEventType,
70 TTouchLogicalFeedback aFeedback );
73 * Gets defined event/feedback type pairs
76 * @param aArray - Event/feedback type pairs is returned here.
78 IMPORT_C void GetFeedbackSpec( RArray<TTactileFbItem>& aArray );
81 * Adds event/feedback type pair to feedback spec.
82 * Using this overload it is possible to define only one feedback type
83 * (vibra/audio) for event.
86 * @param aEventType - Touch event type.
87 * @param aFeedback - Logical feedback type.
88 * @param aFeedbackType - Bitmask to define feedback type (vibra/audio).
89 * @return KErrNone, or one of standard Symbian OS error codes.
91 IMPORT_C TInt AddFeedback( TTouchEventType aEventType,
92 TTouchLogicalFeedback aFeedback,
93 TTouchFeedbackType aFeedbackType );
105 * Array for event type/feedback type pairs
108 RArray<TTactileFbItem> iFbArray;
111 #endif // C_FEEDBACKSPEC_H