1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_ASSETS_ASSET_RESOLVER_H_
6#define FLUTTER_ASSETS_ASSET_RESOLVER_H_
7
8#include <string>
9#include <vector>
10
11#include "flutter/fml/macros.h"
12#include "flutter/fml/mapping.h"
13
14namespace flutter {
15
16class AssetResolver {
17 public:
18 AssetResolver() = default;
19
20 virtual ~AssetResolver() = default;
21
22 virtual bool IsValid() const = 0;
23
24 [[nodiscard]] virtual std::unique_ptr<fml::Mapping> GetAsMapping(
25 const std::string& asset_name) const = 0;
26
27 private:
28 FML_DISALLOW_COPY_AND_ASSIGN(AssetResolver);
29};
30
31} // namespace flutter
32
33#endif // FLUTTER_ASSETS_ASSET_RESOLVER_H_
34