| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 count_ = value; | 119 count_ = value; |
| 120 } | 120 } |
| 121 | 121 |
| 122 void ComputeOffsetAndCount(intptr_t length, | 122 void ComputeOffsetAndCount(intptr_t length, |
| 123 intptr_t* offset, | 123 intptr_t* offset, |
| 124 intptr_t* count); | 124 intptr_t* count); |
| 125 | 125 |
| 126 // Append |serialized_object| to the stream. | 126 // Append |serialized_object| to the stream. |
| 127 void AppendSerializedObject(const char* serialized_object); | 127 void AppendSerializedObject(const char* serialized_object); |
| 128 | 128 |
| 129 // Append |serialized_object| to the stream with |property_name|. |
| 130 void AppendSerializedObject(const char* property_name, |
| 131 const char* serialized_object); |
| 132 |
| 129 private: | 133 private: |
| 130 void Clear(); | 134 void Clear(); |
| 131 void PostNullReply(Dart_Port port); | 135 void PostNullReply(Dart_Port port); |
| 132 | 136 |
| 133 void OpenObject(const char* property_name = NULL); | 137 void OpenObject(const char* property_name = NULL); |
| 134 void CloseObject(); | 138 void CloseObject(); |
| 135 | 139 |
| 136 void OpenArray(const char* property_name = NULL); | 140 void OpenArray(const char* property_name = NULL); |
| 137 void CloseArray(); | 141 void CloseArray(); |
| 138 | 142 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 376 |
| 373 friend class JSONObject; | 377 friend class JSONObject; |
| 374 | 378 |
| 375 DISALLOW_ALLOCATION(); | 379 DISALLOW_ALLOCATION(); |
| 376 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 380 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
| 377 }; | 381 }; |
| 378 | 382 |
| 379 } // namespace dart | 383 } // namespace dart |
| 380 | 384 |
| 381 #endif // VM_JSON_STREAM_H_ | 385 #endif // VM_JSON_STREAM_H_ |
| OLD | NEW |