Make UEFI boot-platform build again
[haiku.git] / headers / private / shared / JsonMessageWriter.h
blob394a8ff61e546667e03322874ba292256451b2f1
1 /*
2 * Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz>
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _JSON_MESSAGE_WRITER_H
6 #define _JSON_MESSAGE_WRITER_H
9 #include "JsonWriter.h"
11 #include <Message.h>
12 #include <String.h>
15 enum json_message_container_what {
16 B_JSON_MESSAGE_WHAT_OBJECT = '_JTM',
17 B_JSON_MESSAGE_WHAT_ARRAY = '_JTA'
21 namespace BPrivate {
23 class BStackedMessageEventListener;
25 class BJsonMessageWriter : public BJsonWriter {
26 friend class BStackedMessageEventListener;
27 public:
28 BJsonMessageWriter(BMessage& message);
29 virtual ~BJsonMessageWriter();
31 bool Handle(const BJsonEvent& event);
32 void Complete();
34 private:
35 void SetStackedListener(
36 BStackedMessageEventListener* listener);
38 BMessage* fTopLevelMessage;
39 BStackedMessageEventListener*
40 fStackedListener;
44 } // namespace BPrivate
46 using BPrivate::BJsonMessageWriter;
48 #endif // _JSON_MESSAGE_WRITER_H