Mercurial > hg > freeDiameter
comparison include/freeDiameter/extension.h @ 732:4a0b61061a6d
Added simple mechanism to declare dependencies between extensions
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 25 Feb 2011 15:46:40 +0900 |
parents | f198d16fa7f4 |
children | 4a9f08d6b6ba |
comparison
equal
deleted
inserted
replaced
731:ef199d6185df | 732:4a0b61061a6d |
---|---|
39 /* Include definition of freeDiameter API */ | 39 /* Include definition of freeDiameter API */ |
40 #include <freeDiameter/freeDiameter-host.h> | 40 #include <freeDiameter/freeDiameter-host.h> |
41 #include <freeDiameter/libfdcore.h> | 41 #include <freeDiameter/libfdcore.h> |
42 | 42 |
43 /* Macro that define the entry point of the extension */ | 43 /* Macro that define the entry point of the extension */ |
44 #define EXTENSION_ENTRY(_name, _function) \ | 44 #define EXTENSION_ENTRY(_name, _function, _depends...) \ |
45 const char *fd_ext_depends[] = { _name , ## _depends , NULL }; \ | |
45 static int extension_loaded = 0; \ | 46 static int extension_loaded = 0; \ |
46 int fd_ext_init(int major, int minor, char * conffile) { \ | 47 int fd_ext_init(int major, int minor, char * conffile) { \ |
47 if ((major != FD_PROJECT_VERSION_MAJOR) \ | 48 if ((major != FD_PROJECT_VERSION_MAJOR) \ |
48 || (minor != FD_PROJECT_VERSION_MINOR)) { \ | 49 || (minor != FD_PROJECT_VERSION_MINOR)) { \ |
49 fprintf(stderr, "This extension (" _name ") was compiled for a different version of freeDiameter.\n"); \ | 50 fprintf(stderr, "This extension (" _name ") was compiled for a different version of freeDiameter.\n"); \ |