22#define IO_NATIVE_LIST(V) \
23 V(Crypto_GetRandomBytes, 1) \
24 V(Directory_Create, 2) \
25 V(Directory_CreateTemp, 2) \
26 V(Directory_Current, 1) \
27 V(Directory_Delete, 3) \
28 V(Directory_Exists, 2) \
29 V(Directory_FillWithDirectoryListing, 5) \
30 V(Directory_GetAsyncDirectoryListerPointer, 1) \
31 V(Directory_Rename, 3) \
32 V(Directory_SetAsyncDirectoryListerPointer, 2) \
33 V(Directory_SetCurrent, 2) \
34 V(Directory_SystemTemp, 1) \
35 V(EventHandler_SendData, 3) \
36 V(EventHandler_TimerMillisecondClock, 0) \
37 V(File_AreIdentical, 3) \
41 V(File_CreateLink, 3) \
42 V(File_CreatePipe, 1) \
44 V(File_DeleteLink, 2) \
47 V(File_GetPointer, 1) \
49 V(File_GetStdioHandleType, 1) \
51 V(File_LastAccessed, 2) \
52 V(File_LastModified, 2) \
54 V(File_LengthFromPath, 2) \
55 V(File_LinkTarget, 2) \
58 V(File_OpenStdio, 1) \
64 V(File_RenameLink, 3) \
65 V(File_ResolveSymbolicLinks, 2) \
66 V(File_SetLastAccessed, 3) \
67 V(File_SetLastModified, 3) \
68 V(File_SetPointer, 2) \
69 V(File_SetPosition, 2) \
72 V(File_WriteByte, 2) \
73 V(File_WriteFrom, 4) \
74 V(FileSystemWatcher_CloseWatcher, 1) \
75 V(FileSystemWatcher_GetSocketId, 2) \
76 V(FileSystemWatcher_InitWatcher, 0) \
77 V(FileSystemWatcher_IsSupported, 0) \
78 V(FileSystemWatcher_ReadEvents, 2) \
79 V(FileSystemWatcher_UnwatchPath, 2) \
80 V(FileSystemWatcher_WatchPath, 5) \
81 V(Filter_CreateZLibDeflate, 8) \
82 V(Filter_CreateZLibInflate, 4) \
83 V(Filter_Process, 4) \
84 V(Filter_Processed, 3) \
85 V(ResourceHandleImpl_toFile, 1) \
86 V(ResourceHandleImpl_toSocket, 1) \
87 V(ResourceHandleImpl_toRawSocket, 1) \
88 V(ResourceHandleImpl_toRawDatagramSocket, 1) \
89 V(InternetAddress_Parse, 1) \
90 V(InternetAddress_ParseScopedLinkLocalAddress, 1) \
91 V(InternetAddress_RawAddrToString, 1) \
92 V(IOService_NewServicePort, 0) \
93 V(Namespace_Create, 2) \
94 V(Namespace_GetDefault, 0) \
95 V(Namespace_GetPointer, 1) \
96 V(OSError_inProgressErrorCode, 0) \
97 V(Platform_NumberOfProcessors, 0) \
98 V(Platform_OperatingSystem, 0) \
99 V(Platform_OperatingSystemVersion, 0) \
100 V(Platform_PathSeparator, 0) \
101 V(Platform_LocalHostname, 0) \
102 V(Platform_ExecutableName, 0) \
103 V(Platform_ResolvedExecutableName, 0) \
104 V(Platform_Environment, 0) \
105 V(Platform_ExecutableArguments, 0) \
106 V(Platform_GetVersion, 0) \
107 V(Platform_LocaleName, 0) \
108 V(Process_Start, 12) \
110 V(Process_KillPid, 2) \
111 V(Process_SetExitCode, 1) \
112 V(Process_GetExitCode, 0) \
114 V(Process_Sleep, 1) \
116 V(Process_SetSignalHandler, 1) \
117 V(Process_ClearSignalHandler, 1) \
118 V(ProcessInfo_CurrentRSS, 0) \
119 V(ProcessInfo_MaxRSS, 0) \
120 V(RawSocketOption_GetOptionValue, 1) \
121 V(SecureSocket_Connect, 7) \
122 V(SecureSocket_Destroy, 1) \
123 V(SecureSocket_FilterPointer, 1) \
124 V(SecureSocket_GetSelectedProtocol, 1) \
125 V(SecureSocket_Handshake, 2) \
126 V(SecureSocket_MarkAsTrusted, 3) \
127 V(SecureSocket_NewX509CertificateWrapper, 1) \
128 V(SecureSocket_Init, 1) \
129 V(SecureSocket_PeerCertificate, 1) \
130 V(SecureSocket_RegisterBadCertificateCallback, 2) \
131 V(SecureSocket_RegisterKeyLogPort, 2) \
132 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \
133 V(SecurityContext_Allocate, 1) \
134 V(SecurityContext_UsePrivateKeyBytes, 3) \
135 V(SecurityContext_SetAlpnProtocols, 3) \
136 V(SecurityContext_SetClientAuthoritiesBytes, 3) \
137 V(SecurityContext_SetTrustedCertificatesBytes, 3) \
138 V(SecurityContext_TrustBuiltinRoots, 1) \
139 V(SecurityContext_SetAllowTlsRenegotiation, 2) \
140 V(SecurityContext_UseCertificateChainBytes, 3) \
141 V(ServerSocket_Accept, 2) \
142 V(ServerSocket_CreateBindListen, 7) \
143 V(ServerSocket_CreateUnixDomainBindListen, 5) \
144 V(SocketBase_IsBindError, 2) \
145 V(Socket_Available, 1) \
146 V(Socket_AvailableDatagram, 1) \
147 V(Socket_CreateBindConnect, 6) \
148 V(Socket_CreateUnixDomainBindConnect, 4) \
149 V(Socket_CreateBindDatagram, 6) \
150 V(Socket_CreateConnect, 4) \
151 V(Socket_CreateUnixDomainConnect, 3) \
152 V(Socket_GetPort, 1) \
153 V(Socket_GetRemotePeer, 1) \
154 V(Socket_GetError, 1) \
157 V(Socket_GetOption, 3) \
158 V(Socket_GetRawOption, 4) \
159 V(Socket_GetSocketId, 1) \
160 V(Socket_GetStdioHandle, 2) \
161 V(Socket_GetType, 1) \
162 V(Socket_JoinMulticast, 4) \
163 V(Socket_LeaveMulticast, 4) \
165 V(Socket_RecvFrom, 1) \
166 V(Socket_ReceiveMessage, 2) \
167 V(Socket_SendMessage, 5) \
168 V(Socket_SendTo, 6) \
169 V(Socket_SetOption, 4) \
170 V(Socket_SetRawOption, 4) \
171 V(Socket_SetSocketId, 3) \
172 V(Socket_WriteList, 4) \
173 V(Socket_HasPendingWrite, 1) \
174 V(SocketControlMessage_fromHandles, 2) \
175 V(SocketControlMessageImpl_extractHandles, 1) \
176 V(Stdin_ReadByte, 1) \
177 V(Stdin_GetEchoMode, 1) \
178 V(Stdin_SetEchoMode, 2) \
179 V(Stdin_GetEchoNewlineMode, 1) \
180 V(Stdin_SetEchoNewlineMode, 2) \
181 V(Stdin_GetLineMode, 1) \
182 V(Stdin_SetLineMode, 2) \
183 V(Stdin_AnsiSupported, 1) \
184 V(Stdout_GetTerminalSize, 1) \
185 V(Stdout_AnsiSupported, 1) \
186 V(StringToSystemEncoding, 1) \
187 V(SynchronousSocket_Available, 1) \
188 V(SynchronousSocket_CloseSync, 1) \
189 V(SynchronousSocket_CreateConnectSync, 3) \
190 V(SynchronousSocket_GetPort, 1) \
191 V(SynchronousSocket_GetRemotePeer, 1) \
192 V(SynchronousSocket_LookupRequest, 2) \
193 V(SynchronousSocket_ShutdownRead, 1) \
194 V(SynchronousSocket_ShutdownWrite, 1) \
195 V(SynchronousSocket_Read, 2) \
196 V(SynchronousSocket_ReadList, 4) \
197 V(SynchronousSocket_WriteList, 4) \
198 V(SystemEncodingToString, 1) \
204 V(X509_StartValidity, 1) \
205 V(X509_EndValidity, 1)
217 bool* auto_setup_scope) {
222 ASSERT(auto_setup_scope !=
nullptr);
223 *auto_setup_scope =
true;
225 for (
int i = 0;
i < num_entries;
i++) {
237 for (
int i = 0;
i < num_entries;
i++) {
240 return reinterpret_cast<const uint8_t*
>(entry->
name_);
struct _Dart_Handle * Dart_Handle
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
#define REGISTER_FUNCTION(name, count)
#define DECLARE_FUNCTION(name, count)
static const struct dart::bin::NativeEntries IOEntries[]
IO_NATIVE_LIST(DECLARE_FUNCTION)
const uint8_t * IONativeSymbol(Dart_NativeFunction nf)
Dart_NativeFunction IONativeLookup(Dart_Handle name, int argument_count, bool *auto_setup_scope)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
const char *const function_name
DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle object, const char **cstr)
Dart_NativeFunction function_