summaryrefslogtreecommitdiff
path: root/src/mbgl/style/source_observer.hpp
blob: 020ead4dbaa08263e989428fb5d78f9ff4d907d1 (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 <exception>

namespace mbgl {

class OverscaledTileID;

namespace style {

class Source;

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

    virtual void onSourceLoaded(Source&) {}
    virtual void onSourceError(Source&, std::exception_ptr) {}
    virtual void onTileLoaded(Source&, const OverscaledTileID&, bool /* isNewTile */) {}
    virtual void onTileError(Source&, const OverscaledTileID&, std::exception_ptr) {}
    virtual void onNeedsRepaint() {}
};

} // namespace style
} // namespace mbgl