2018-11-07 12:24:35 -08:00
|
|
|
// Copyright 2013 The Flutter Authors. All rights reserved.
|
2016-04-06 10:22:46 -07:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
2016-08-12 16:12:07 -07:00
|
|
|
#ifndef FLUTTER_RUNTIME_EMBEDDER_RESOURCES_H_
|
|
|
|
|
#define FLUTTER_RUNTIME_EMBEDDER_RESOURCES_H_
|
2016-04-06 10:22:46 -07:00
|
|
|
|
2016-10-28 15:01:07 -07:00
|
|
|
namespace flutter {
|
|
|
|
|
namespace runtime {
|
2016-04-06 10:22:46 -07:00
|
|
|
|
|
|
|
|
struct ResourcesEntry {
|
|
|
|
|
const char* path_;
|
|
|
|
|
const char* resource_;
|
|
|
|
|
int length_;
|
|
|
|
|
};
|
|
|
|
|
|
2016-10-28 15:01:07 -07:00
|
|
|
} // namespace runtime
|
|
|
|
|
} // namespace flutter
|
2016-04-06 10:22:46 -07:00
|
|
|
|
2019-04-09 12:44:42 -07:00
|
|
|
namespace flutter {
|
2016-04-06 10:22:46 -07:00
|
|
|
|
|
|
|
|
class EmbedderResources {
|
|
|
|
|
public:
|
2019-04-09 17:50:06 -07:00
|
|
|
EmbedderResources(runtime::ResourcesEntry* resources_table);
|
2016-04-06 10:22:46 -07:00
|
|
|
|
|
|
|
|
static const int kNoSuchInstance;
|
|
|
|
|
|
|
|
|
|
int ResourceLookup(const char* path, const char** resource);
|
|
|
|
|
const char* Path(int idx);
|
|
|
|
|
|
|
|
|
|
private:
|
2019-04-09 17:50:06 -07:00
|
|
|
runtime::ResourcesEntry* At(int idx);
|
2016-04-06 10:22:46 -07:00
|
|
|
|
2019-04-09 17:50:06 -07:00
|
|
|
runtime::ResourcesEntry* resources_table_;
|
2016-04-06 10:22:46 -07:00
|
|
|
};
|
|
|
|
|
|
2019-04-09 12:44:42 -07:00
|
|
|
} // namespace flutter
|
2016-04-06 10:22:46 -07:00
|
|
|
|
2016-08-12 16:12:07 -07:00
|
|
|
#endif // FLUTTER_RUNTIME_EMBEDDER_RESOURCES_H_
|