| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/profileiconcache.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "iprofileiconcache.h"cxx . . $ `<file>/src/core/iprofileiconcache.h`/ |
| 7 | #include <filesystem> |
| 8 | #include <memory> |
| 9 | #include <optional> |
| 10 | #include <vector> |
| 11 | |
| 12 | class IFileCachecxx . . $ IFileCache#; |
| 13 | |
| 14 | class ProfileIconCachecxx . . $ ProfileIconCache# final : public IProfileIconCachecxx . . $ IProfileIconCache# |
| 15 | { |
| 16 | public: |
| 17 | ProfileIconCachecxx . . $ ProfileIconCache#ProfileIconCache(4499baa0f79f933b).(stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IFileCachecxx . . $ IFileCache#> &&cache) noexcept; |
| 18 | |
| 19 | void initcxx . . $ ProfileIconCache#init(49f6e7a06ebc5aa8).() override; |
| 20 | |
| 21 | bool tryOrCachecxx . . $ ProfileIconCache#tryOrCache(55a8732119d590fe).(IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# &info, |
| 22 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<char> const &fallbackIcon) override; |
| 23 | |
| 24 | bool cachecxx . . $ ProfileIconCache#cache(55a8732119d590fe).(IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# &info, stdcxx . . $ std/::vectorcxx . . $ std/vector#<char> const &iconData) override; |
| 25 | |
| 26 | stdcxx . . $ std/::paircxx . . $ std/pair#<bool, bool> syncCachecxx . . $ ProfileIconCache#syncCache(2154c7156f3f0c8c).(IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# &info) override; |
| 27 | |
| 28 | void cleancxx . . $ ProfileIconCache#clean(874cae2a8ac0280d).(IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# &info) override; |
| 29 | |
| 30 | private: |
| 31 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path#> |
| 32 | cacheIconFromDatacxx . . $ ProfileIconCache#cacheIconFromData(265168d99255d22a).(stdcxx . . $ std/::vectorcxx . . $ std/vector#<char> const &iconData, |
| 33 | IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# const &info) const; |
| 34 | |
| 35 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IFileCachecxx . . $ IFileCache#> const cache_cxx . . $ ProfileIconCache#cache_.; |
| 36 | }; |