Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Account.FidoClient / Interop / Interop.Uaf.Authenticator.cs
1 // Copyright 2016 by Samsung Electronics, Inc.,
2 //
3 // This software is the confidential and proprietary information
4 // of Samsung Electronics, Inc. ("Confidential Information"). You
5 // shall not disclose such Confidential Information and shall use
6 // it only in accordance with the terms of the license agreement
7 // you entered into with Samsung.
8
9 using System;
10 using System.Runtime.InteropServices;
11 using Tizen.Internals.Errors;
12
13 internal static partial class Interop
14 {
15     internal static partial class UafAuthenticator
16     {
17         [DllImport(Libraries.FidoClient, EntryPoint = "fido_foreach_authenticator")]
18         internal static extern int ForeachAuthenticator(FidoAuthenticatorCallback cb, IntPtr /* void */ userData);
19
20         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_title")]
21         internal static extern int GetTitle(IntPtr /* fido_authenticator_h */ auth, out IntPtr title);
22
23         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_aaid")]
24         internal static extern int GetAaid(IntPtr /* fido_authenticator_h */ auth, out IntPtr aaid);
25
26         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_description")]
27         internal static extern int GetDescription(IntPtr /* fido_authenticator_h */ auth, out IntPtr desc);
28
29         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_assertion_scheme")]
30         internal static extern int GetAssertionScheme(IntPtr /* fido_authenticator_h */ auth, out IntPtr scheme);
31
32         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_algorithm")]
33         internal static extern int GetAlgorithm(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_algo_e */ algo);
34
35         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_foreach_attestation_type")]
36         internal static extern int ForeachAttestationType(IntPtr /* fido_authenticator_h */ auth, FidoAttestationTypeCallback cb, IntPtr /* void */ userData);
37
38         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_verification_method")]
39         internal static extern int GetVerificationMethod(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_user_verify_type_e */ userVerification);
40
41         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_key_protection_method")]
42         internal static extern int GetKeyProtectionMethod(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_key_protection_type_e */ keyProtection);
43
44         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_matcher_protection_method")]
45         internal static extern int GetMatcherProtectionMethod(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_matcher_protection_type_e */ matcherProtection);
46
47         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_attachment_hint")]
48         internal static extern int GetAttachmentHint(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_attachment_hint_e */ attachmentHint);
49
50         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_is_second_factor_only")]
51         internal static extern bool GetIsSecondFactorOnly(IntPtr /* fido_authenticator_h */ auth);
52
53         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_tc_discplay")]
54         internal static extern int GetTcDiscplay(IntPtr /* fido_authenticator_h */ auth, out int /* fido_auth_tc_display_type_e */ tcDisplay);
55
56         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_tc_display_type")]
57         internal static extern int GetTcDisplayType(IntPtr /* fido_authenticator_h */ auth, out IntPtr tcDisplayContentType);
58
59         [DllImport(Libraries.FidoClient, EntryPoint = "fido_authenticator_get_icon")]
60         internal static extern int GetIcon(IntPtr /* fido_authenticator_h */ auth, out IntPtr icon);
61
62         [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
63         internal delegate void FidoAuthenticatorCallback(IntPtr /* fido_authenticator_h */ authInfo, IntPtr /* void */ userData);
64
65         [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
66         internal delegate void FidoAttestationTypeCallback(int /* fido_auth_attestation_type_e */ attType, IntPtr /* void */ userData);
67     }
68 }