repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haikudepot / server / StandardMetaDataJsonEventListener.h
blob7d4be36d2f0a78c5d71b951c1216613803642d88
1 /*
2 * Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
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>
11 #include <String.h>
12 #include <StringList.h>
14 class SmdStackedEventListener;
16 class StandardMetaDataJsonEventListener : public BJsonEventListener {
17 friend class SmdStackedEventListener;
18 public:
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,
26 const char* message);
27 void Complete();
28 status_t ErrorStatus();
30 protected:
31 void SetStackedListener(SmdStackedEventListener *listener);
33 private:
34 void SetJsonPath(const BString& jsonPath);
35 StandardMetaData* MetaData();
37 BStringList fJsonPathObjectNames;
38 StandardMetaData* fMetaData;
39 status_t fErrorStatus;
40 SmdStackedEventListener*
41 fStackedListener;
45 #endif // STANDARD_META_DATA_JSON_EVENT_LISTENER_H