Flutter Engine
The Flutter Engine
dart_io_api_impl.cc
Go to the documentation of this file.
1// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
6
7#include "bin/crypto.h"
8#include "bin/directory.h"
9#include "bin/eventhandler.h"
10#include "bin/io_natives.h"
11#include "bin/platform.h"
12#include "bin/process.h"
13#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
15#endif
16#include "bin/thread.h"
17#include "bin/utils.h"
18
19namespace dart {
20namespace bin {
21
23 // Bootstrap 'dart:io' event handler.
26#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
28#endif
30}
31
35#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
37#endif
39}
40
41void SetSystemTempDirectory(const char* system_temp) {
42 Directory::SetSystemTemp(system_temp);
43}
44
45void SetExecutableName(const char* executable_name) {
46 Platform::SetExecutableName(executable_name);
47}
48
49void SetExecutableArguments(int script_index, char** argv) {
51}
52
54 ASSERT(info != nullptr);
56
57 Process::GetRSSInformation(&(info->max_rss), &(info->current_rss));
58}
59
60void* OpenFile(const char* name, bool write) {
62}
63void ReadFile(uint8_t** data, intptr_t* file_len, void* stream) {
65}
66void WriteFile(const void* buffer, intptr_t num_bytes, void* stream) {
68}
69void CloseFile(void* stream) {
71}
72
73bool GetEntropy(uint8_t* buffer, intptr_t length) {
75}
76
79 bool* auto_setup_scope) {
80 return IONativeLookup(name, argument_count, auto_setup_scope);
81}
82
84 return IONativeSymbol(nf);
85}
86
87} // namespace bin
88} // namespace dart
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
static bool GetRandomBytes(intptr_t count, uint8_t *buffer)
static void ReadFile(uint8_t **data, intptr_t *file_len, void *stream)
Definition: dartutils.cc:273
static void CloseFile(void *stream)
Definition: dartutils.cc:303
static void * OpenFile(const char *name, bool write)
Definition: dartutils.cc:261
static void WriteFile(const void *buffer, intptr_t num_bytes, void *stream)
Definition: dartutils.cc:294
static void SetSystemTemp(const char *path)
Definition: directory.cc:187
static void SetExecutableName(const char *executable_name)
Definition: platform.h:71
static void SetExecutableArguments(int script_index, char **argv)
Definition: platform.h:92
static void Cleanup()
static void GetRSSInformation(int64_t *max_rss, int64_t *current_rss)
Definition: process.cc:393
static void TerminateExitCodeHandler()
static void Init()
static void InitOnce()
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
Definition: dart_api.h:3207
#define DART_EMBEDDER_INFORMATION_CURRENT_VERSION
#define ASSERT(E)
int argument_count
Definition: fuchsia.cc:52
size_t length
char ** argv
Definition: library.h:9
void SetExecutableName(const char *executable_name)
void WriteFile(const void *buffer, intptr_t num_bytes, void *stream)
void ReadFile(uint8_t **data, intptr_t *file_len, void *stream)
void GetIOEmbedderInformation(Dart_EmbedderInformation *info)
void SetExecutableArguments(int script_index, char **argv)
Dart_NativeFunction LookupIONative(Dart_Handle name, int argument_count, bool *auto_setup_scope)
void CleanupDartIo()
void CloseFile(void *stream)
void BootstrapDartIo()
const uint8_t * LookupIONativeSymbol(Dart_NativeFunction nf)
bool GetEntropy(uint8_t *buffer, intptr_t length)
const uint8_t * IONativeSymbol(Dart_NativeFunction nf)
Definition: io_natives.cc:235
Dart_NativeFunction IONativeLookup(Dart_Handle name, int argument_count, bool *auto_setup_scope)
Definition: io_natives.cc:215
void * OpenFile(const char *name, bool write)
void SetSystemTempDirectory(const char *system_temp)
Definition: dart_vm.cc:33
const char *const name
static int8_t data[kExtLength]
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126
void write(SkWStream *wStream, const T &text)
Definition: skqp.cpp:188