OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 VM_JSON_STREAM_H_ | 5 #ifndef VM_JSON_STREAM_H_ |
6 #define VM_JSON_STREAM_H_ | 6 #define VM_JSON_STREAM_H_ |
7 | 7 |
8 #include "include/dart_api.h" // for Dart_Port | 8 #include "include/dart_api.h" // for Dart_Port |
9 #include "platform/text_buffer.h" | 9 #include "platform/text_buffer.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // | 40 // |
41 enum JSONRpcErrorCode { | 41 enum JSONRpcErrorCode { |
42 kParseError = -32700, | 42 kParseError = -32700, |
43 kInvalidRequest = -32600, | 43 kInvalidRequest = -32600, |
44 kMethodNotFound = -32601, | 44 kMethodNotFound = -32601, |
45 kInvalidParams = -32602, | 45 kInvalidParams = -32602, |
46 kInternalError = -32603, | 46 kInternalError = -32603, |
47 | 47 |
48 kExtensionError = -32000, | 48 kExtensionError = -32000, |
49 | 49 |
50 kFeatureDisabled = 100, | 50 kFeatureDisabled = 100, |
51 kVMMustBePaused = 101, | 51 kVMMustBePaused = 101, |
52 kCannotAddBreakpoint = 102, | 52 kCannotAddBreakpoint = 102, |
53 kStreamAlreadySubscribed = 103, | 53 kStreamAlreadySubscribed = 103, |
54 kStreamNotSubscribed = 104, | 54 kStreamNotSubscribed = 104, |
55 kIsolateMustBeRunnable = 105, | 55 kIsolateMustBeRunnable = 105, |
| 56 kIsolateMustBePaused = 106, |
56 }; | 57 }; |
57 | 58 |
58 // Expected that user_data is a JSONStream*. | 59 // Expected that user_data is a JSONStream*. |
59 void AppendJSONStreamConsumer(Dart_StreamConsumer_State state, | 60 void AppendJSONStreamConsumer(Dart_StreamConsumer_State state, |
60 const char* stream_name, | 61 const char* stream_name, |
61 const uint8_t* buffer, | 62 const uint8_t* buffer, |
62 intptr_t buffer_length, | 63 intptr_t buffer_length, |
63 void* user_data); | 64 void* user_data); |
64 | 65 |
65 class JSONStream : ValueObject { | 66 class JSONStream : ValueObject { |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 | 413 |
413 friend class JSONObject; | 414 friend class JSONObject; |
414 | 415 |
415 DISALLOW_ALLOCATION(); | 416 DISALLOW_ALLOCATION(); |
416 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 417 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
417 }; | 418 }; |
418 | 419 |
419 } // namespace dart | 420 } // namespace dart |
420 | 421 |
421 #endif // VM_JSON_STREAM_H_ | 422 #endif // VM_JSON_STREAM_H_ |
OLD | NEW |