2 * Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz>
3 * Distributed under the terms of the MIT License.
5 #ifndef _JSON_EVENT_LISTENER_H
6 #define _JSON_EVENT_LISTENER_H
14 /*! This constant line number can be used in raising an error where the
15 client raising the error does not know on which line the error arose.
18 #define JSON_EVENT_LISTENER_ANY_LINE -1
22 class BJsonEventListener
{
25 virtual ~BJsonEventListener();
27 virtual bool Handle(const BJsonEvent
& event
) = 0;
28 virtual void HandleError(status_t status
, int32 line
,
29 const char* message
) = 0;
30 virtual void Complete() = 0;
33 } // namespace BPrivate
35 using BPrivate::BJsonEventListener
;
37 #endif // _JSON_EVENT_LISTENER_H