fd601936b30632623decbe08ce3ad99b30388bce
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia / Interop / Interop.MediaVision.BarCode.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;
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 barcode detector APIs
33         /// </summary>
34         internal static partial class BarCodeDetector
35         {
36             [DllImport(Libraries.MediaVision, EntryPoint = "mv_barcode_detect")]
37             internal static extern int Detect(IntPtr /* mv_source_h */ source, IntPtr /* mv_engine_config_h */ engineCfg, Rectangle roi, MvBarcodeDetectedCallback detectCb, IntPtr /* void */ userData);
38
39             [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
40             internal delegate void MvBarcodeDetectedCallback(IntPtr /* mv_source_h */ source, IntPtr /* mv_engine_config_h */ engineCfg, IntPtr barcodeLocations, IntPtr messages, IntPtr /* mv_barcode_type_e */ types, int numberOfBarcodes, IntPtr /* void */ userData);
41         }
42
43         /// <summary>
44         /// Interop for barcode generator APIs
45         /// </summary>
46         internal static partial class BarCodeGenerator
47         {
48             [DllImport(Libraries.MediaVision, EntryPoint = "mv_barcode_generate_source")]
49             internal static extern int GenerateSource(IntPtr /* mv_engine_config_h */ engineCfg, string message, BarcodeType /* mv_barcode_type_e */ type, QrMode /* mv_barcode_qr_mode_e */ qrEncMode, ErrorCorrectionLevel /* mv_barcode_qr_ecc_e */ qrEcc, int qrVersion, IntPtr /* mv_source_h */ image);
50
51             [DllImport(Libraries.MediaVision, EntryPoint = "mv_barcode_generate_image")]
52             internal static extern int GenerateImage(IntPtr /* mv_engine_config_h */ engineCfg, string message, int imageWidth, int imageHeight, BarcodeType /* mv_barcode_type_e */ type, QrMode /* mv_barcode_qr_mode_e */ qrEncMode, ErrorCorrectionLevel /* mv_barcode_qr_ecc_e */ qrEcc, int qrVersion, string imagePath, BarcodeImageFormat /* mv_barcode_image_format_e */ imageFormat);
53         }
54     }
55 }