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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Returns true if there is an param with key and value, false | 101 // Returns true if there is an param with key and value, false |
102 // otherwise. | 102 // otherwise. |
103 bool ParamIs(const char* key, const char* value) const; | 103 bool ParamIs(const char* key, const char* value) const; |
104 | 104 |
105 const char* method() const { return method_; } | 105 const char* method() const { return method_; } |
106 const char** param_keys() const { return param_keys_; } | 106 const char** param_keys() const { return param_keys_; } |
107 const char** param_values() const { return param_values_; } | 107 const char** param_values() const { return param_values_; } |
108 | 108 |
109 private: | 109 private: |
110 void Clear(); | 110 void Clear(); |
| 111 void PostNullReply(Dart_Port port); |
111 | 112 |
112 void OpenObject(const char* property_name = NULL); | 113 void OpenObject(const char* property_name = NULL); |
113 void CloseObject(); | 114 void CloseObject(); |
114 | 115 |
115 void OpenArray(const char* property_name = NULL); | 116 void OpenArray(const char* property_name = NULL); |
116 void CloseArray(); | 117 void CloseArray(); |
117 | 118 |
118 void PrintValueBool(bool b); | 119 void PrintValueBool(bool b); |
119 void PrintValue(intptr_t i); | 120 void PrintValue(intptr_t i); |
120 void PrintValue64(int64_t i); | 121 void PrintValue64(int64_t i); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 325 |
325 friend class JSONObject; | 326 friend class JSONObject; |
326 | 327 |
327 DISALLOW_ALLOCATION(); | 328 DISALLOW_ALLOCATION(); |
328 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 329 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
329 }; | 330 }; |
330 | 331 |
331 } // namespace dart | 332 } // namespace dart |
332 | 333 |
333 #endif // VM_JSON_STREAM_H_ | 334 #endif // VM_JSON_STREAM_H_ |
OLD | NEW |