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_RUNTIME_EMBEDDER_RESOURCES_H_ 6 #define FLUTTER_RUNTIME_EMBEDDER_RESOURCES_H_ 7 8 namespace flutter { 9 namespace runtime { 10 11 struct ResourcesEntry { 12 const char* path_; 13 const char* resource_; 14 int length_; 15 }; 16 17 } // namespace runtime 18 } // namespace flutter 19 20 namespace flutter { 21 22 class EmbedderResources { 23 public: 24 EmbedderResources(runtime::ResourcesEntry* resources_table); 25 26 static const int kNoSuchInstance; 27 28 int ResourceLookup(const char* path, const char** resource); 29 const char* Path(int idx); 30 31 private: 32 runtime::ResourcesEntry* At(int idx); 33 34 runtime::ResourcesEntry* resources_table_; 35 }; 36 37 } // namespace flutter 38 39 #endif // FLUTTER_RUNTIME_EMBEDDER_RESOURCES_H_ 40