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/json.h" | 9 #include "platform/json.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 void set_count(intptr_t value) { | 117 void set_count(intptr_t value) { |
118 ASSERT(value > 0); | 118 ASSERT(value > 0); |
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. |
| 127 void AppendSerializedObject(const char* serialized_object); |
| 128 |
126 private: | 129 private: |
127 void Clear(); | 130 void Clear(); |
128 void PostNullReply(Dart_Port port); | 131 void PostNullReply(Dart_Port port); |
129 | 132 |
130 void OpenObject(const char* property_name = NULL); | 133 void OpenObject(const char* property_name = NULL); |
131 void CloseObject(); | 134 void CloseObject(); |
132 | 135 |
133 void OpenArray(const char* property_name = NULL); | 136 void OpenArray(const char* property_name = NULL); |
134 void CloseArray(); | 137 void CloseArray(); |
135 | 138 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 370 |
368 friend class JSONObject; | 371 friend class JSONObject; |
369 | 372 |
370 DISALLOW_ALLOCATION(); | 373 DISALLOW_ALLOCATION(); |
371 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 374 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
372 }; | 375 }; |
373 | 376 |
374 } // namespace dart | 377 } // namespace dart |
375 | 378 |
376 #endif // VM_JSON_STREAM_H_ | 379 #endif // VM_JSON_STREAM_H_ |
OLD | NEW |