summaryrefslogtreecommitdiff
path: root/src/mbgl/style/source_observer.hpp
blob: 610897c4ce24ecc855cd159d2978c449d55df253 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <mbgl/util/event.hpp>

#include <exception>

namespace mbgl {
namespace style {

class Source;

class SourceObserver {
public:
    virtual ~SourceObserver() = default;

    virtual void onSourceLoaded(Source&) {}
    virtual void onSourceChanged(Source&) {}
    virtual void onSourceError(Source&, std::exception_ptr, EventSeverity = EventSeverity::Error) {}

    // Source description needs to be reloaded
    virtual void onSourceDescriptionChanged(Source&) {}
};

} // namespace style
} // namespace mbgl