2 * Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz>.
3 * All rights reserved. Distributed under the terms of the MIT License.
5 #ifndef STANDARD_META_DATA_JSON_EVENT_LISTENER_H
6 #define STANDARD_META_DATA_JSON_EVENT_LISTENER_H
8 #include "StandardMetaData.h"
10 #include <JsonEventListener.h>
12 #include <StringList.h>
14 class SmdStackedEventListener
;
16 class StandardMetaDataJsonEventListener
: public BJsonEventListener
{
17 friend class SmdStackedEventListener
;
19 StandardMetaDataJsonEventListener(
20 const BString
& jsonPath
,
21 StandardMetaData
& metaData
);
22 virtual ~StandardMetaDataJsonEventListener();
24 bool Handle(const BJsonEvent
& event
);
25 void HandleError(status_t status
, int32 line
,
28 status_t
ErrorStatus();
31 void SetStackedListener(SmdStackedEventListener
*listener
);
34 void SetJsonPath(const BString
& jsonPath
);
35 StandardMetaData
* MetaData();
37 BStringList fJsonPathObjectNames
;
38 StandardMetaData
* fMetaData
;
39 status_t fErrorStatus
;
40 SmdStackedEventListener
*
45 #endif // STANDARD_META_DATA_JSON_EVENT_LISTENER_H