| 1 | /* |
| 2 | Copyright 2018 Google Inc. All Rights Reserved. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS-IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef THIRD_PARTY_SADIE_HRTF_DATABASE_GENERATED_HRTF_ASSETS_H_ |
| 18 | #define THIRD_PARTY_SADIE_HRTF_DATABASE_GENERATED_HRTF_ASSETS_H_ |
| 19 | |
| 20 | #include <memory> |
| 21 | #include <string> |
| 22 | #include <unordered_map> |
| 23 | #include <vector> |
| 24 | |
| 25 | namespace sadie { |
| 26 | |
| 27 | // Note this class is automatically generated. Do not modify. |
| 28 | class HrtfAssets { |
| 29 | public: |
| 30 | // Lookups and retrieves a file from an asset class. |
| 31 | // |
| 32 | // @param filename: Filename to be retrieved. |
| 33 | // @return std::string with raw file data. In case of an error, a nullptr is |
| 34 | // returned. Caller must take over the ownership of the returned data. |
| 35 | std::unique_ptr<std::string> GetFile(const std::string& filename) const; |
| 36 | |
| 37 | private: |
| 38 | typedef std::unordered_map<std::string, std::vector<unsigned char>> |
| 39 | AssetDataMap; |
| 40 | static const AssetDataMap kAssetMap; |
| 41 | }; |
| 42 | |
| 43 | } // namespace sadie |
| 44 | |
| 45 | #endif // THIRD_PARTY_SADIE_HRTF_DATABASE_GENERATED_HRTF_ASSETS_H_ |
| 46 | |