refactor(flatpak): move provider into plugins/flatpak-provider

Moves FlatpakManager out of the core sources and adds the plugin entry
point exporting the provider-plugin C ABI, so Flatpak can be built and
loaded as an external plugin instead of a compiled-in provider.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
BlackAngelTV committed 2026-08-29 20:32:11 +02:00
1 parent 8fda7636f9
commit e57d5dbb99
3 files changed
+24

No files matched your search

@@ -0,0 +1,24 @@
// 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.
//
// Build with CMake: 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.
#include "flatpak-manager.h"
#include "provider-plugin.h"
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 "FWS"; }
extern "C" IPackageManager* fws_create_provider() { return new FlatpakManager(); }
// The backing tool is installed by the pacman package "flatpak"; exposing it
// lets the Providers page offer to install the missing tool.
extern "C" const char* fws_plugin_install_hint() { return "flatpak"; }