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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1170 * | 1170 * |
1171 * \return True if the message was posted. | 1171 * \return True if the message was posted. |
1172 */ | 1172 */ |
1173 DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle object); | 1173 DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle object); |
1174 | 1174 |
1175 /** | 1175 /** |
1176 * Returns a new SendPort with the provided port id. | 1176 * Returns a new SendPort with the provided port id. |
1177 */ | 1177 */ |
1178 DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port_id); | 1178 DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port_id); |
1179 | 1179 |
1180 /** | |
1181 * Gets the SendPort id for the provided SendPort. | |
1182 * Returns Dart_Null if the provided port is not associated with | |
Ivan Posva
2014/06/27 06:21:49
This comment does not appear to be correct (based
siva
2014/06/30 17:18:14
Fixed the comment adding the param field and retur
| |
1183 * the current isolate. | |
Ivan Posva
2014/06/27 06:21:49
\param and \return comments?
siva
2014/06/30 17:18:14
Done.
| |
1184 */ | |
1185 DART_EXPORT Dart_Handle Dart_SendPortGetId(Dart_Handle port, | |
1186 Dart_Port* port_id); | |
1180 | 1187 |
1181 DART_EXPORT Dart_Handle Dart_ReceivePortGetId(Dart_Handle port, | |
1182 Dart_Port* port_id); | |
1183 | |
1184 /** | |
1185 * Gets the ReceivePort for the provided port id. | |
1186 * Returns Dart_Null if a port with the provided port id is not associated with | |
1187 * the current isolate. | |
1188 * | |
1189 * Note that there is at most one ReceivePort for a given port id. | |
1190 */ | |
1191 DART_EXPORT Dart_Handle Dart_GetReceivePort(Dart_Port port_id); | |
1192 | |
1193 | |
1194 /** | |
1195 * Posts an object to the send port. | |
1196 * | |
1197 * \param send_port A Dart SendPort. | |
1198 * \param object An object from the current isolate. | |
1199 * | |
1200 * \return Success if no error occurs. Otherwise returns an error handle. | |
1201 */ | |
1202 DART_EXPORT Dart_Handle Dart_PostMessage(Dart_Handle send_port, | |
1203 Dart_Handle object); | |
1204 | 1188 |
1205 /* | 1189 /* |
1206 * ====== | 1190 * ====== |
1207 * Scopes | 1191 * Scopes |
1208 * ====== | 1192 * ====== |
1209 */ | 1193 */ |
1210 | 1194 |
1211 /** | 1195 /** |
1212 * Enters a new scope. | 1196 * Enters a new scope. |
1213 * | 1197 * |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2802 * NOTE: If multiple callbacks with the same name are registered, only the | 2786 * NOTE: If multiple callbacks with the same name are registered, only the |
2803 * last callback registered will be remembered. | 2787 * last callback registered will be remembered. |
2804 */ | 2788 */ |
2805 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 2789 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
2806 const char* name, | 2790 const char* name, |
2807 Dart_ServiceRequestCallback callback, | 2791 Dart_ServiceRequestCallback callback, |
2808 void* user_data); | 2792 void* user_data); |
2809 | 2793 |
2810 | 2794 |
2811 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2795 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |