[Vision] Change DLLImport file (#1618)
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Vision / Interop / Interop.MediaVision.Surveillance.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18 using System.Runtime.InteropServices;
19 using Tizen.Multimedia.Vision;
20
21 /// <summary>
22 /// Interop APIs.
23 /// </summary>
24 internal static partial class Interop
25 {
26     /// <summary>
27     /// Interop for Media Vision APIs.
28     /// </summary>
29     internal static partial class MediaVision
30     {
31         /// <summary>
32         /// Interop for Surveillance APIs.
33         /// </summary>
34         internal static partial class Surveillance
35         {
36             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_event_trigger_create")]
37             internal static extern MediaVisionError EventTriggerCreate(string eventType, out IntPtr trigger);
38
39             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_event_trigger_destroy")]
40             internal static extern int EventTriggerDestroy(IntPtr trigger);
41
42             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_get_event_trigger_type")]
43             internal static extern int GetEventTriggerType(IntPtr trigger, out string eventType);
44
45             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_set_event_trigger_roi")]
46             internal static extern MediaVisionError SetEventTriggerRoi(IntPtr trigger, int numberOfPoints, Point[] roi);
47
48             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_get_event_trigger_roi")]
49             internal static extern MediaVisionError GetEventTriggerRoi(IntPtr trigger, out int numberOfPoints, out IntPtr roi);
50
51             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_subscribe_event_trigger")]
52             internal static extern MediaVisionError SubscribeEventTrigger(IntPtr trigger, int videoStreamId,
53                 IntPtr engineCfg, EventOccurredCallback callback, IntPtr userData = default(IntPtr));
54
55             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_unsubscribe_event_trigger")]
56             internal static extern MediaVisionError UnsubscribeEventTrigger(IntPtr trigger, int videoStreamId);
57
58             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_push_source")]
59             internal static extern MediaVisionError PushSource(IntPtr source, int videoStreamId);
60
61             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_foreach_supported_event_type")]
62             internal static extern int ForeachSupportedEventType(EventTypeCallback callback, IntPtr userData);
63
64             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_foreach_event_result_name")]
65             internal static extern int ForeachEventResultName(string eventType, EventResultNameCallback callback,
66                 IntPtr userData);
67
68             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_get_result_value")]
69             internal static extern MediaVisionError GetResultValue(IntPtr result, string name, out int value);
70
71             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_get_result_value")]
72             internal static extern MediaVisionError GetResultValue(IntPtr result, string name, [Out] int[] value);
73
74             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_get_result_value")]
75             internal static extern MediaVisionError GetResultValue(IntPtr result, string name, [Out] double[] value);
76
77             [DllImport(Libraries.MediaVisionSurveillance, EntryPoint = "mv_surveillance_get_result_value")]
78             internal static extern MediaVisionError GetResultValue(IntPtr result, string name, [Out] Rectangle[] value);
79
80             [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
81             internal delegate void EventOccurredCallback(IntPtr trigger, IntPtr source,
82                 int videoStreamId, IntPtr eventResult, IntPtr userData);
83
84             [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
85             internal delegate bool EventTypeCallback(string eventType, IntPtr userData);
86
87             [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
88             internal delegate bool EventResultNameCallback(string name, IntPtr userData);
89         }
90     }
91 }