| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
| 4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef INCLUDE_DART_API_H_ | 7 #ifndef INCLUDE_DART_API_H_ |
| 8 #define INCLUDE_DART_API_H_ | 8 #define INCLUDE_DART_API_H_ |
| 9 | 9 |
| 10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 * or NULL if no snapshot is provided. | 854 * or NULL if no snapshot is provided. |
| 855 * \param create A function to be called during isolate creation. | 855 * \param create A function to be called during isolate creation. |
| 856 * See Dart_IsolateCreateCallback. | 856 * See Dart_IsolateCreateCallback. |
| 857 * \param interrupt A function to be called when an isolate is interrupted. | 857 * \param interrupt A function to be called when an isolate is interrupted. |
| 858 * See Dart_IsolateInterruptCallback. | 858 * See Dart_IsolateInterruptCallback. |
| 859 * \param unhandled_exception A function to be called if an isolate has an | 859 * \param unhandled_exception A function to be called if an isolate has an |
| 860 * unhandled exception. Set Dart_IsolateUnhandledExceptionCallback. | 860 * unhandled exception. Set Dart_IsolateUnhandledExceptionCallback. |
| 861 * \param shutdown A function to be called when an isolate is shutdown. | 861 * \param shutdown A function to be called when an isolate is shutdown. |
| 862 * See Dart_IsolateShutdownCallback. | 862 * See Dart_IsolateShutdownCallback. |
| 863 * | 863 * |
| 864 * \return NULL if initialization is successful. Returns an error message | 864 * \return True if initialization is successful. |
| 865 * otherwise. The caller is responsible for freeing the error message. | |
| 866 */ | 865 */ |
| 867 DART_EXPORT char* Dart_Initialize( | 866 DART_EXPORT bool Dart_Initialize( |
| 868 const uint8_t* vm_isolate_snapshot, | 867 const uint8_t* vm_isolate_snapshot, |
| 869 Dart_IsolateCreateCallback create, | 868 Dart_IsolateCreateCallback create, |
| 870 Dart_IsolateInterruptCallback interrupt, | 869 Dart_IsolateInterruptCallback interrupt, |
| 871 Dart_IsolateUnhandledExceptionCallback unhandled_exception, | 870 Dart_IsolateUnhandledExceptionCallback unhandled_exception, |
| 872 Dart_IsolateShutdownCallback shutdown, | 871 Dart_IsolateShutdownCallback shutdown, |
| 873 Dart_FileOpenCallback file_open, | 872 Dart_FileOpenCallback file_open, |
| 874 Dart_FileReadCallback file_read, | 873 Dart_FileReadCallback file_read, |
| 875 Dart_FileWriteCallback file_write, | 874 Dart_FileWriteCallback file_write, |
| 876 Dart_FileCloseCallback file_close, | 875 Dart_FileCloseCallback file_close, |
| 877 Dart_EntropySource entropy_source); | 876 Dart_EntropySource entropy_source); |
| 878 | 877 |
| 879 /** | 878 /** |
| 880 * Cleanup state in the VM before process termination. | 879 * Cleanup state in the VM before process termination. |
| 881 * | 880 * |
| 882 * \return NULL if cleanup is successful. Returns an error message otherwise. | 881 * \return True if cleanup is successful. |
| 883 * The caller is responsible for freeing the error message. | |
| 884 */ | 882 */ |
| 885 DART_EXPORT char* Dart_Cleanup(); | 883 DART_EXPORT bool Dart_Cleanup(); |
| 886 | 884 |
| 887 /** | 885 /** |
| 888 * Sets command line flags. Should be called before Dart_Initialize. | 886 * Sets command line flags. Should be called before Dart_Initialize. |
| 889 * | 887 * |
| 890 * \param argc The length of the arguments array. | 888 * \param argc The length of the arguments array. |
| 891 * \param argv An array of arguments. | 889 * \param argv An array of arguments. |
| 892 * | 890 * |
| 893 * \return True if VM flags set successfully. | 891 * \return True if VM flags set successfully. |
| 894 */ | 892 */ |
| 895 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv); | 893 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv); |
| (...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2835 | 2833 |
| 2836 /** | 2834 /** |
| 2837 * Returns the port that script load requests should be sent on. | 2835 * Returns the port that script load requests should be sent on. |
| 2838 * | 2836 * |
| 2839 * \return Returns the port for load requests or ILLEGAL_PORT if the service | 2837 * \return Returns the port for load requests or ILLEGAL_PORT if the service |
| 2840 * isolate failed to startup or does not support load requests. | 2838 * isolate failed to startup or does not support load requests. |
| 2841 */ | 2839 */ |
| 2842 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort(); | 2840 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort(); |
| 2843 | 2841 |
| 2844 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2842 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
| OLD | NEW |