Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013, 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 | |
| 5 #ifndef BIN_VMSTATS_H_ | |
| 6 #define BIN_VMSTATS_H_ | |
| 7 | |
| 8 #include "include/dart_api.h" | |
| 9 | |
| 10 /** | |
| 11 * A VM status callback. Status plug-ins implement and register this | |
| 12 * function using Dart_RegisterStatusPlugin. When Dart_GetVMStatus is | |
|
siva
2013/02/15 05:59:10
The comment seems a bit out dated (Dart_GetVMStatu
Tom Ball
2013/02/16 00:57:19
Updated.
| |
| 13 * called with the plug-in's status type, the callback is invoked to | |
| 14 * provide the requested information. | |
| 15 * | |
| 16 * Note: status requests execute outside of an isolate (which is why | |
| 17 * handles aren't used). | |
| 18 * | |
| 19 * \param parameters an optional string that defines REST-like parameters | |
| 20 * to define what information is requested. | |
| 21 * | |
| 22 * \return Returns a valid JSON string, allocated from C heap. The caller | |
| 23 * is responsible for releasing this string. | |
| 24 */ | |
| 25 typedef char* (*Dart_VmStatusCallback)(const char* parameters); | |
| 26 | |
| 27 | |
| 28 /** | |
| 29 * Register a VM status plug-in. The specified status type must not already | |
| 30 * have a registered plug-in. | |
| 31 * | |
| 32 * \return 0 if the plug-in was registered, or -1 if there is an error. | |
| 33 */ | |
| 34 DART_EXPORT int Dart_RegisterVmStatusPlugin( | |
| 35 const char* status_type, Dart_VmStatusCallback callback); | |
| 36 | |
| 37 #endif // BIN_VMSTATS_H_ | |
| OLD | NEW |