api.h 584 B

1234567891011121314151617181920212223242526
  1. #ifndef SDPOPS_API_H
  2. #define SDPOPS_API_H
  3. #include "../../str.h"
  4. typedef int (*sdp_with_media_t)(struct sip_msg*, str*);
  5. typedef struct sdpops_binds {
  6. sdp_with_media_t sdp_with_media;
  7. } sdpops_api_t;
  8. typedef int (*bind_sdpops_f)(sdpops_api_t*);
  9. int bind_sdpops(struct sdpops_binds*);
  10. inline static int sdpops_load_api(sdpops_api_t *sob)
  11. {
  12. bind_sdpops_f bind_sdpops_exports;
  13. if (!(bind_sdpops_exports = (bind_sdpops_f)find_export("bind_sdpops", 1, 0)))
  14. {
  15. LM_ERR("Failed to import bind_sdpops\n");
  16. return -1;
  17. }
  18. return bind_sdpops_exports(sob);
  19. }
  20. #endif /*SDPOPS_API_H*/