OLD | NEW |
---|---|
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef INCLUDE_DART_TOOLS_API_H_ | 5 #ifndef INCLUDE_DART_TOOLS_API_H_ |
6 #define INCLUDE_DART_TOOLS_API_H_ | 6 #define INCLUDE_DART_TOOLS_API_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 /** \mainpage Dart Tools Embedding API Reference | 10 /** \mainpage Dart Tools Embedding API Reference |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
890 * | 890 * |
891 * \return Success if the arguments are well formed. Otherwise, returns an | 891 * \return Success if the arguments are well formed. Otherwise, returns an |
892 * error handle. | 892 * error handle. |
893 */ | 893 */ |
894 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id, | 894 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id, |
895 const char* event_kind, | 895 const char* event_kind, |
896 const uint8_t* bytes, | 896 const uint8_t* bytes, |
897 intptr_t bytes_length); | 897 intptr_t bytes_length); |
898 | 898 |
899 /* | 899 /* |
900 * ===== | |
901 * DevFS | |
902 * ===== | |
903 */ | |
904 | |
905 /** | |
906 * Determines if a uri is a DevFS uri. | |
907 * | |
908 * \param uri The uri to test. This parameter is a string. | |
909 * | |
910 * \return true if uri is a DevFS uri and false otherwise. | |
911 */ | |
912 DART_EXPORT bool Dart_IsDevFSUri(Dart_Handle uri); | |
turnidge
2016/06/10 18:45:34
Consider dropping the embedding api changes until
| |
913 | |
914 | |
915 /** | |
916 * Attempts to read the DevFS file at uri. | |
917 * | |
918 * \param uri The uri to read. This parameter is a string. | |
919 * | |
920 * \return A typed data array of Dart_TypedData_kUint8 containing the contents | |
921 * of the file. Otherwise, returns an error handle. | |
922 */ | |
923 DART_EXPORT Dart_Handle Dart_DevFSReadFile(Dart_Handle uri); | |
924 | |
925 | |
926 /** | |
927 * Attempts to read the DevFS file at uri. | |
928 * | |
929 * \param uri The uri to read. This parameter is a string. | |
930 * | |
931 * \return A string containing the contents of the file. Otherwise, | |
932 * returns an error handle. | |
933 */ | |
934 DART_EXPORT Dart_Handle Dart_DevFSReadFileAsUTF8String(Dart_Handle uri); | |
935 | |
936 | |
937 /* | |
900 * ======== | 938 * ======== |
901 * Timeline | 939 * Timeline |
902 * ======== | 940 * ======== |
903 */ | 941 */ |
904 | 942 |
905 /** | 943 /** |
906 * Returns a timestamp in microseconds. This timestamp is suitable for | 944 * Returns a timestamp in microseconds. This timestamp is suitable for |
907 * passing into the timeline system. | 945 * passing into the timeline system. |
908 * | 946 * |
909 * \return A timestamp that can be passed to the timeline system. | 947 * \return A timestamp that can be passed to the timeline system. |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1061 * \param start_recording See Dart_EmbedderTimelineStartRecording. | 1099 * \param start_recording See Dart_EmbedderTimelineStartRecording. |
1062 * \param stop_recording See Dart_EmbedderTimelineStopRecording. | 1100 * \param stop_recording See Dart_EmbedderTimelineStopRecording. |
1063 * | 1101 * |
1064 * NOTE: To avoid races, this should be called before Dart_Initialize. | 1102 * NOTE: To avoid races, this should be called before Dart_Initialize. |
1065 */ | 1103 */ |
1066 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks( | 1104 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks( |
1067 Dart_EmbedderTimelineStartRecording start_recording, | 1105 Dart_EmbedderTimelineStartRecording start_recording, |
1068 Dart_EmbedderTimelineStopRecording stop_recording); | 1106 Dart_EmbedderTimelineStopRecording stop_recording); |
1069 | 1107 |
1070 #endif // INCLUDE_DART_TOOLS_API_H_ | 1108 #endif // INCLUDE_DART_TOOLS_API_H_ |
OLD | NEW |