/src/libheif/libheif/plugins_unix.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * HEIF codec. |
3 | | * Copyright (c) 2023 Dirk Farin <dirk.farin@gmail.com> |
4 | | * |
5 | | * This file is part of libheif. |
6 | | * |
7 | | * libheif is free software: you can redistribute it and/or modify |
8 | | * it under the terms of the GNU Lesser General Public License as |
9 | | * published by the Free Software Foundation, either version 3 of |
10 | | * the License, or (at your option) any later version. |
11 | | * |
12 | | * libheif is distributed in the hope that it will be useful, |
13 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | | * GNU Lesser General Public License for more details. |
16 | | * |
17 | | * You should have received a copy of the GNU Lesser General Public License |
18 | | * along with libheif. If not, see <http://www.gnu.org/licenses/>. |
19 | | */ |
20 | | |
21 | | #ifndef LIBHEIF_PLUGINS_UNIX_H |
22 | | #define LIBHEIF_PLUGINS_UNIX_H |
23 | | |
24 | | #include <vector> |
25 | | #include <string> |
26 | | #include "init.h" |
27 | | |
28 | | std::vector<std::string> get_plugin_directories_from_environment_variable_unix(); |
29 | | |
30 | | std::vector<std::string> list_all_potential_plugins_in_directory_unix(const char*); |
31 | | |
32 | | class PluginLibrary_Unix : public PluginLibrary |
33 | | { |
34 | | public: |
35 | | heif_error load_from_file(const char* filename) override; |
36 | | |
37 | | void release() override; |
38 | | |
39 | 0 | heif_plugin_info* get_plugin_info() override { return m_plugin_info; } |
40 | | |
41 | | bool operator==(const PluginLibrary_Unix& b) const |
42 | 0 | { |
43 | 0 | return m_library_handle == b.m_library_handle; |
44 | 0 | } |
45 | | |
46 | | private: |
47 | | void* m_library_handle = nullptr; |
48 | | heif_plugin_info* m_plugin_info = nullptr; |
49 | | }; |
50 | | |
51 | | #endif //LIBHEIF_PLUGINS_UNIX_H |