00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _DOMAIN_API_H
00024 #define _DOMAIN_API_H
00025
00026 #include "../../sr_module.h"
00027 #include "../../dprint.h"
00028 #include "domain.h"
00029
00030 typedef struct domain_api {
00031 is_domain_local_f is_domain_local;
00032 } domain_api_t;
00033
00034 typedef int (*bind_domain_f)(domain_api_t* api);
00035 int bind_domain(domain_api_t* api);
00036
00037 static inline int load_domain_api(domain_api_t* api)
00038 {
00039 bind_domain_f bind_domain;
00040
00041 bind_domain = (bind_domain_f)find_export("bind_domain", 0, 0);
00042
00043 if (bind_domain == NULL) {
00044 ERR("Cannot import bind_domain function from domain module\n");
00045 return -1;
00046 }
00047
00048 if (bind_domain(api) == -1) {
00049 return -1;
00050 }
00051 return 0;
00052 }
00053
00054
00055 #endif