2
0

sdp_cloner.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * SDP parser interface
  3. *
  4. * Copyright (C) 2008-2009 SOMA Networks, INC.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice,
  10. * this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR
  16. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  17. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  18. * EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  19. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  20. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  21. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  22. * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  23. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  24. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. *
  26. */
  27. #ifndef SDP_CLONER_H
  28. #define SDP_CLONER_H
  29. #include "sdp.h"
  30. /**
  31. * Clone the given sdp_session_cell structure.
  32. */
  33. sdp_session_cell_t * clone_sdp_session_cell(sdp_session_cell_t *session);
  34. /**
  35. * Free all memory associated with the cloned sdp_session structure.
  36. *
  37. * Note: this will free up the parsed sdp structure (form SHM_MEM).
  38. */
  39. void free_cloned_sdp_session(sdp_session_cell_t *_session);
  40. /**
  41. * Clone the given sdp_info structure.
  42. *
  43. * Note: all cloned structer will be in SHM_MEM.
  44. */
  45. sdp_info_t* clone_sdp_info(struct sip_msg* _m);
  46. /**
  47. * Free all memory associated with the cloned sdp_info structure.
  48. *
  49. * Note: this will free up the parsed sdp structure (form SHM_MEM).
  50. */
  51. void free_cloned_sdp(sdp_info_t* sdp);
  52. #endif /* SDP_H */