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 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2810 * pointer will be freed by the VM by calling free. | 2810 * pointer will be freed by the VM by calling free. |
2811 */ | 2811 */ |
2812 typedef const char* (*Dart_ServiceRequestCallback)( | 2812 typedef const char* (*Dart_ServiceRequestCallback)( |
2813 const char* method, | 2813 const char* method, |
2814 const char** param_keys, | 2814 const char** param_keys, |
2815 const char** param_values, | 2815 const char** param_values, |
2816 intptr_t num_params, | 2816 intptr_t num_params, |
2817 void* user_data); | 2817 void* user_data); |
2818 | 2818 |
2819 /** | 2819 /** |
2820 * Register a Dart_ServiceRequestCallback to be called to handle requests | 2820 * Register a Dart_ServiceRequestCallback to be called to handle |
2821 * with name on a specific isolate. The callback will be invoked with the | 2821 * requests for the named rpc on a specific isolate. The callback will |
2822 * current isolate set to the request target. | 2822 * be invoked with the current isolate set to the request target. |
2823 * | 2823 * |
2824 * \param name The name of the command that this callback is responsible for. | 2824 * \param method The name of the method that this callback is responsible for. |
2825 * \param callback The callback to invoke. | 2825 * \param callback The callback to invoke. |
2826 * \param user_data The user data passed to the callback. | 2826 * \param user_data The user data passed to the callback. |
2827 * | 2827 * |
2828 * NOTE: If multiple callbacks with the same name are registered, only the | 2828 * NOTE: If multiple callbacks with the same name are registered, only |
2829 * last callback registered will be remembered. | 2829 * the last callback registered will be remembered. |
2830 */ | 2830 */ |
2831 DART_EXPORT void Dart_RegisterIsolateServiceRequestCallback( | 2831 DART_EXPORT void Dart_RegisterIsolateServiceRequestCallback( |
2832 const char* name, | 2832 const char* method, |
2833 Dart_ServiceRequestCallback callback, | 2833 Dart_ServiceRequestCallback callback, |
2834 void* user_data); | 2834 void* user_data); |
2835 | 2835 |
2836 /** | 2836 /** |
2837 * Register a Dart_ServiceRequestCallback to be called to handle requests | 2837 * Register a Dart_ServiceRequestCallback to be called to handle |
2838 * with name. The callback will be invoked without a current isolate. | 2838 * requests for the named rpc. The callback will be invoked without a |
| 2839 * current isolate. |
2839 * | 2840 * |
2840 * \param name The name of the command that this callback is responsible for. | 2841 * \param method The name of the command that this callback is responsible for. |
2841 * \param callback The callback to invoke. | 2842 * \param callback The callback to invoke. |
2842 * \param user_data The user data passed to the callback. | 2843 * \param user_data The user data passed to the callback. |
2843 * | 2844 * |
2844 * NOTE: If multiple callbacks with the same name are registered, only the | 2845 * NOTE: If multiple callbacks with the same name are registered, only |
2845 * last callback registered will be remembered. | 2846 * the last callback registered will be remembered. |
2846 */ | 2847 */ |
2847 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 2848 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
2848 const char* name, | 2849 const char* method, |
2849 Dart_ServiceRequestCallback callback, | 2850 Dart_ServiceRequestCallback callback, |
2850 void* user_data); | 2851 void* user_data); |
2851 | 2852 |
2852 | 2853 |
2853 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2854 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |