#ifndef RUNTIME_INCLUDE_BIN_DART_IO_API_H_
#define RUNTIME_INCLUDE_BIN_DART_IO_API_H_
#include "../dart_tools_api.h"
namespace dart {
namespace bin {
void BootstrapDartIo();
void CleanupDartIo();
void SetSystemTempDirectory(const char* system_temp);
void SetCaptureStdout(bool value);
void SetCaptureStderr(bool value);
bool ShouldCaptureStdout();
bool ShouldCaptureStderr();
void SetExecutableName(const char* executable_name);
void SetExecutableArguments(int script_index, char** argv);
void GetIOEmbedderInformation(Dart_EmbedderInformation* info);
void* OpenFile(const char* name, bool write);
void ReadFile(uint8_t** data, intptr_t* file_len, void* stream);
void WriteFile(const void* buffer, intptr_t num_bytes, void* stream);
void CloseFile(void* stream);
bool GetEntropy(uint8_t* buffer, intptr_t length);
Dart_NativeFunction LookupIONative(Dart_Handle name,
int argument_count,
bool* auto_setup_scope);
void* LookupIOFfiNative(const char* name, uintptr_t argument_count);
const uint8_t* LookupIONativeSymbol(Dart_NativeFunction nf);
struct DartIoSettings {
Dart_Handle http_connection_hook = nullptr;
Dart_Handle locale_name_callback = nullptr;
Dart_Handle namespace_root = nullptr;
const char* script_uri = nullptr;
bool disable_exit = false;
bool enable_network_profiling = true;
};
Dart_Handle SetupDartIoLibrary(const DartIoSettings& settings);
} }
#endif