Browse Source

Add module load and unload to the exported coroapi.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1626 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 17 years ago
parent
commit
50c25e7609
2 changed files with 12 additions and 0 deletions
  1. 3 0
      exec/apidef.c
  2. 9 0
      include/coroapi.h

+ 3 - 0
exec/apidef.c

@@ -47,6 +47,7 @@
 #include "ipc.h"
 #include "../include/coroapi.h"
 #include "service.h"
+#include "../lcr/lcr_ifact.h"
 
 LOGSYS_DECLARE_SUBSYS ("APIDEF", LOG_INFO);
 
@@ -76,6 +77,8 @@ static struct corosync_api_v1 apidef_corosync_api_v1 = {
 	.totem_ip_print = totemip_print,
 	.service_link_and_init = openais_service_link_and_init,
 	.service_unlink_and_exit = openais_service_unlink_and_exit,
+	.plugin_interface_reference = lcr_ifact_reference,
+	.plugin_interface_release = lcr_ifact_release,
 	.error_memory_failure = NULL
 };
 

+ 9 - 0
include/coroapi.h

@@ -357,6 +357,15 @@ struct corosync_api_v1 {
 
 	char *(*totem_ip_print) (struct totem_ip_address *addr);
 
+	int (*plugin_interface_reference) (
+		unsigned int *handle, 
+		char *iface_name,
+		int version,
+		void **interface,
+		void *context);
+
+	int (*plugin_interface_release) (unsigned int handle);
+
 	/*
 	 * Service loading and unloading APIs
 	*/