1 #ifndef __DALI_HAPTIC_PLAYER_H__
2 #define __DALI_HAPTIC_PLAYER_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/object/base-handle.h>
27 namespace Internal DALI_INTERNAL
36 * @brief Plays haptic effects.
38 class DALI_IMPORT_API HapticPlayer : public BaseHandle
43 * @brief Create an uninitialized handle.
45 * This can be initialized by calling HapticPlayer::Get().
50 * @brief Create an initialized handle to the HapticPlayer.
52 * @return A handle to a newly allocated Dali resource.
54 static HapticPlayer Get();
59 * This is non-virtual since derived Handle types must not contain data or virtual methods.
64 * @brief Plays a monotone vibration.
65 * @param[in] duration The duration of the vibration.
67 void PlayMonotone(unsigned int duration);
70 * @brief Plays vibration in predefined patterns.
71 * @param[in] filePath Path to the file containing the effect.
73 void PlayFile(const std::string filePath);
76 * @brief Stops the currently playing vibration effects.
80 public: // Not intended for application developers
83 * @brief This constructor is used by HapticPlayer::Get().
84 * @param[in] hapticPlayer A pointer to the haptic player.
86 explicit DALI_INTERNAL HapticPlayer( Internal::Adaptor::HapticPlayer* hapticPlayer );
91 #endif // __DALI_HAPTIC_PLAYER_H__