Files
FWS-PacManage/plugins/flatpak-provider/flatpak-provider.cpp
T
BlackAngelTV 8658855cca feat(plugin): support generic addon plugins and build Flatpak by default
The Plugins page replaces the Providers tab and lists every plugin alike:
package-manager providers and generic C++ addons, which can be any extension
(UI tweak, helper, ...) via IPlugin (onLoad/onUnload/onUiReady) exported with
the new FWS_ADDON_PLUGIN macro. Flatpak now ships as a plugin built by
default (FWS_BUILD_FLATPAK_PLUGIN=ON), so a plain build is Flatpak-enabled.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-10 18:49:46 +02:00

26 lines
1.4 KiB
C++

// Flatpak provider plugin — an external provider loaded at runtime by
// PluginManager from the plugins/ directory next to the executable (or in
// ~/.local/share/PacManager/plugins/). It exports the C ABI contract declared
// in provider-plugin.h so the host can query metadata, check the backing tool,
// and instantiate the manager without any compiled-in Flatpak support.
//
// Built by default (see the FWS_BUILD_FLATPAK_PLUGIN CMake option): the
// flatpak-provider-plugin target compiles this file together with
// flatpak-manager.cpp into libflatpak-provider.so and copies it next to the
// PacManager binary, so a default build ships with Flatpak support enabled.
#include "flatpak-manager.h"
#include "provider-plugin.h"
extern "C" const char* fws_plugin_kind() { return "provider"; }
extern "C" const char* fws_plugin_id() { return "flatpak"; }
extern "C" const char* fws_plugin_name() { return "Flatpak"; }
extern "C" const char* fws_plugin_version() { return "1.0.0"; }
extern "C" const char* fws_plugin_description() {
return "Gestionnaire d'applications Flatpak";
}
extern "C" const char* fws_plugin_author() { return "BlackAngelTV"; }
extern "C" IPackageManager* fws_create_provider() { return new FlatpakManager(); }
// The backing tool is installed by the pacman package "flatpak"; exposing it
// lets the Plugins page offer to install the missing tool.
extern "C" const char* fws_plugin_install_hint() { return "flatpak"; }