Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Security.TEEC / Interop / Interop.Types.cs
1 /*
2  *  Copyright (c) 2017 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
18 using System;
19 using System.Runtime.InteropServices;
20
21 internal static partial class Interop
22 {
23     [StructLayout(LayoutKind.Sequential)]
24     internal struct TEEC_Context
25     {
26         public readonly IntPtr imp;
27     }
28
29     [StructLayout(LayoutKind.Sequential)]
30     internal struct TEEC_Session
31     {
32         public readonly IntPtr imp;
33     }
34
35     [StructLayout(LayoutKind.Sequential)]
36     internal struct TEEC_UUID
37     {
38         public UInt32 timeLow;
39         public UInt16 timeMid;
40         public UInt16 timeHiAndVersion;
41         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
42         public byte[] clockSeqAndNode;
43     }
44
45     [StructLayout(LayoutKind.Sequential)]
46     internal struct sTEEC_SharedMemoryImp
47     {
48         public IntPtr context;
49         public IntPtr context_imp;
50         public UInt32 flags;
51         public UInt32 memid;
52     }
53
54     [StructLayout(LayoutKind.Sequential)]
55     internal struct TEEC_SharedMemory
56     {
57         public IntPtr buffer;
58         public UInt32 size;
59         public UInt32 flags;
60     }
61
62     [StructLayout(LayoutKind.Sequential)]
63     internal struct TEEC_Parameter
64     {
65         public UInt32 a;
66         public UInt32 b;
67     }
68
69     [StructLayout(LayoutKind.Sequential)]
70     internal struct TEEC_Operation
71     {
72         public UInt32 started;
73         public UInt32 paramTypes;
74         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
75         public TEEC_Parameter[] paramlist;
76         public IntPtr imp;
77     }
78 }
79