2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Runtime.InteropServices;
20 internal static partial class Interop
22 internal static partial class Feedback
24 internal enum FeedbackError
26 None = Tizen.Internals.Errors.ErrorCode.None,
27 OperationFailed = Tizen.Internals.Errors.ErrorCode.NotPermitted,
28 InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,
29 NotSupported = Tizen.Internals.Errors.ErrorCode.NoSuchDevice,
30 PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,
31 NotInitialized = -0x00020000 | 0x12,
34 // Any change here might require changes in Tizen.System.FeedbackType enum
35 internal enum FeedbackType
41 [DllImport(Libraries.Feedback, EntryPoint = "feedback_initialize")]
42 internal static extern int Initialize();
44 [DllImport(Libraries.Feedback, EntryPoint = "feedback_deinitialize")]
45 internal static extern int Deinitialize();
47 [DllImport(Libraries.Feedback, EntryPoint = "feedback_play")]
48 internal static extern int Play(int pattern);
50 [DllImport(Libraries.Feedback, EntryPoint = "feedback_play_type")]
51 internal static extern int PlayType(FeedbackType type, int pattern);
53 [DllImport(Libraries.Feedback, EntryPoint = "feedback_stop")]
54 internal static extern int Stop();
56 [DllImport(Libraries.Feedback, EntryPoint = "feedback_is_supported_pattern")]
57 internal static extern int IsSupportedPattern(FeedbackType type, int pattern, out bool supported);