sdpops/api.h

00001 #ifndef SDPOPS_API_H
00002 #define SDPOPS_API_H
00003 #include "../../str.h"
00004 
00005 typedef int (*sdp_with_media_t)(struct sip_msg*, str*);
00006 
00007 typedef struct sdpops_binds {
00008         sdp_with_media_t sdp_with_media;
00009 } sdpops_api_t;
00010 
00011 typedef int (*bind_sdpops_f)(sdpops_api_t*);
00012 
00013 int bind_sdpops(struct sdpops_binds*);
00014 
00015 inline static int sdpops_load_api(sdpops_api_t *sob)
00016 {
00017         bind_sdpops_f bind_sdpops_exports;
00018         if (!(bind_sdpops_exports = (bind_sdpops_f)find_export("bind_sdpops", 1, 0)))
00019         {
00020                 LM_ERR("Failed to import bind_sdpops\n");
00021                 return -1;
00022         }
00023         return bind_sdpops_exports(sob);
00024 }
00025 
00026 #endif /*SDPOPS_API_H*/