Zen-C
Loading...
Searching...
No Matches
plugin_manager.c File Reference
#include "plugin_manager.h"
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for plugin_manager.c:

Data Structures

struct  PluginNode
 

Typedefs

typedef struct PluginNode PluginNode
 

Functions

void zptr_plugin_mgr_init (void)
 Initialize the plugin system.
 
void zptr_register_plugin (ZPlugin *plugin)
 Register a plugin directly (for built-in plugins).
 
ZPluginzptr_load_plugin (const char *path)
 Load a plugin from a shared object file (.so).
 
ZPluginzptr_find_plugin (const char *name)
 Find a registered plugin by name.
 
void zptr_plugin_mgr_cleanup (void)
 Cleanup the plugin system and free resources.
 

Typedef Documentation

◆ PluginNode

typedef struct PluginNode PluginNode

Function Documentation

◆ zptr_find_plugin()

ZPlugin * zptr_find_plugin ( const char *  name)

Find a registered plugin by name.

Parameters
nameThe name of the plugin.
Returns
ZPlugin* Pointer to the plugin or NULL if not found.
Here is the caller graph for this function:

◆ zptr_load_plugin()

ZPlugin * zptr_load_plugin ( const char *  path)

Load a plugin from a shared object file (.so).

Parameters
pathPath to the shared object file.
Returns
ZPlugin* Pointer to the loaded plugin on success, NULL on failure.
Here is the caller graph for this function:

◆ zptr_plugin_mgr_cleanup()

void zptr_plugin_mgr_cleanup ( void  )

Cleanup the plugin system and free resources.

Here is the caller graph for this function:

◆ zptr_plugin_mgr_init()

void zptr_plugin_mgr_init ( void  )

Initialize the plugin system.

Here is the caller graph for this function:

◆ zptr_register_plugin()

void zptr_register_plugin ( ZPlugin plugin)

Register a plugin directly (for built-in plugins).

Parameters
pluginThe plugin to register.
Here is the call graph for this function: