[Olsr-cvs] olsrd-current/lib/mini/src olsrd_plugin.c, 1.1, 1.2 olsrd_plugin.h, 1.1, NONE

Bruno Randolf (spam-protected)
Sun May 29 14:47:44 CEST 2005


Update of /cvsroot/olsrd/olsrd-current/lib/mini/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25973/lib/mini/src

Modified Files:
	olsrd_plugin.c 
Removed Files:
	olsrd_plugin.h 
Log Message:
new plugin interface:
  - plugins can now directly access all olsrd data structures
  - a plugin only has to include "olsrd_plugin.h" and provide 3 interface functions:
      1. olsrd_plugin_interface_version()
      2. olsrd_plugin_register_param()
      3. olsrd_plugin_init()
    which are called in the above order
  - moved all plugins to the new interface


--- olsrd_plugin.h DELETED ---

Index: olsrd_plugin.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/mini/src/olsrd_plugin.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** olsrd_plugin.c	26 May 2005 16:09:25 -0000	1.1
--- olsrd_plugin.c	29 May 2005 12:47:41 -0000	1.2
***************
*** 54,60 ****
   */
  int 
! get_plugin_interface_version()
  {
! 	return PLUGIN_INTERFACE_VERSION;
  }
  
--- 54,60 ----
   */
  int 
! olsrd_plugin_interface_version()
  {
! 	return OLSRD_PLUGIN_INTERFACE_VERSION;
  }
  
***************
*** 65,69 ****
   */
  int
! register_olsr_param(char *key, char *value)
  {
  	if(!strcmp(key, "test")) {
--- 65,69 ----
   */
  int
! olsrd_plugin_register_param(char *key, char *value)
  {
  	if(!strcmp(key, "test")) {
***************
*** 80,84 ****
   */
  int
! plugin_init()
  {
  	printf("*** MINI: plugin_init\n");
--- 80,84 ----
   */
  int
! olsrd_plugin_init()
  {
  	printf("*** MINI: plugin_init\n");
***************
*** 97,100 ****
--- 97,107 ----
  /* attention: make static to avoid name clashes */
  
+ static void __attribute__ ((constructor)) 
+ my_init(void);
+ 
+ static void __attribute__ ((destructor)) 
+ my_fini(void);
+ 
+ 
  /**
   * Optional Private Constructor




More information about the Olsr-cvs mailing list