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_DEBUGGER_API_H_ | 5 #ifndef INCLUDE_DART_DEBUGGER_API_H_ |
6 #define INCLUDE_DART_DEBUGGER_API_H_ | 6 #define INCLUDE_DART_DEBUGGER_API_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 typedef struct _Dart_Breakpoint* Dart_Breakpoint; | 10 typedef struct _Dart_Breakpoint* Dart_Breakpoint; |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
571 | 571 |
572 | 572 |
573 /** | 573 /** |
574 * Returns the isolate object corresponding to the isolate id. | 574 * Returns the isolate object corresponding to the isolate id. |
575 * | 575 * |
576 * \return The Dart_Isolate object corresponding to the isolate id. | 576 * \return The Dart_Isolate object corresponding to the isolate id. |
577 * If the specified id is invalid NULL is returned. | 577 * If the specified id is invalid NULL is returned. |
578 */ | 578 */ |
579 DART_EXPORT Dart_Isolate Dart_GetIsolate(Dart_IsolateId isolate_id); | 579 DART_EXPORT Dart_Isolate Dart_GetIsolate(Dart_IsolateId isolate_id); |
580 | 580 |
581 | |
582 /** | |
583 * Returns VM status information. VM status is implemented using a | |
584 * different status plug-in for each type of status; for example, there | |
585 * might be an "isolate" plug-in that returns information about the | |
586 * current isolates. | |
587 * | |
588 * To get a list of status types, this function is called with a | |
589 * status_type parameter of "statustypes". This list is useful when | |
590 * building a status dashboard. | |
591 * | |
592 * \param request A REST-like string, which uses '/' to separate | |
593 * parameters. The first parameter is always the status type. | |
594 * | |
595 * \return The requested status as a JSON formatted string, with the | |
596 * contents defined by the status plug-in. The caller is responsible | |
597 * for freeing this string. | |
598 */ | |
599 DART_EXPORT char* Dart_GetVmStatus(const char* request); | |
600 | |
601 | |
602 /** | |
603 * A VM status callback. Status plug-ins implement and register this | |
604 * function using Dart_RegisterStatusPlugin. When Dart_GetVMStatus is | |
605 * called with the plug-in's status type, the callback is invoked to | |
606 * provide the requested information. | |
607 * | |
608 * Note: status requests execute outside of an isolate (which is why | |
609 * handles aren't used). | |
610 * | |
611 * \param parameters an optional string that defines REST-like parameters | |
612 * to define what information is requested. | |
613 * | |
614 * \return Returns a valid JSON string, allocated from C heap. The caller | |
615 * is responsible for releasing this string. | |
616 */ | |
617 typedef char* (*Dart_VmStatusCallback)(const char* parameters); | |
618 | |
619 | |
620 /** | |
621 * Register a VM status plug-in. The specified status type must not already | |
622 * have a registered plug-in. | |
623 * | |
624 * \return True if the plug-in was registered, or an error describing the | |
625 * failure. | |
626 */ | |
627 DART_EXPORT Dart_Handle Dart_RegisterVmStatusPlugin( | |
628 const char* status_type, Dart_VmStatusCallback callback); | |
siva
2013/02/09 01:00:57
I guess I am not clear about why external entities
Tom Ball
2013/02/14 23:45:16
It's so other libraries like io can add status. Is
| |
629 | |
581 #endif // INCLUDE_DART_DEBUGGER_API_H_ | 630 #endif // INCLUDE_DART_DEBUGGER_API_H_ |
OLD | NEW |