23 using callback_t = bool(
Mod&);
24 using CallbackFn = std::function<callback_t>;
30 LLNDAPI State getState()
const;
32 LLNDAPI
Manifest const& getManifest()
const;
34 LLNDAPI std::string
const& getName()
const;
36 LLNDAPI std::string
const& getType()
const;
38 LLNDAPI std::filesystem::path
const& getModDir()
const;
40 LLNDAPI std::filesystem::path
const& getDataDir()
const;
42 LLNDAPI std::filesystem::path
const& getConfigDir()
const;
44 LLNDAPI std::filesystem::path
const& getLangDir()
const;
48 [[nodiscard]]
bool isEnabled()
const {
return getState() == State::Enabled; }
50 [[nodiscard]]
bool isDisabled()
const {
return getState() == State::Disabled; }
53 LLAPI
void onLoad(CallbackFn func)
noexcept;
55 LLAPI
void onUnload(CallbackFn func)
noexcept;
57 LLAPI
void onEnable(CallbackFn func)
noexcept;
59 LLAPI
void onDisable(CallbackFn func)
noexcept;
62 LLAPI
void release()
noexcept;
64 LLAPI
void setState(State state)
const;
67 LLNDAPI
bool hasOnLoad()
const noexcept;
69 LLNDAPI
bool hasOnUnload()
const noexcept;
71 LLNDAPI
bool hasOnEnable()
const noexcept;
73 LLNDAPI
bool hasOnDisable()
const noexcept;
76 LLAPI Expected<> onLoad()
noexcept;
78 LLAPI Expected<> onUnload()
noexcept;
80 LLAPI Expected<> onEnable()
noexcept;
82 LLAPI Expected<> onDisable()
noexcept;
88 std::unique_ptr<Impl> mImpl;