km_val.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (C) 2001-2003 FhG Fokus
  3. * Copyright (C) 2008 1&1 Internet AG
  4. *
  5. * This file is part of Kamailio, a free SIP server.
  6. *
  7. * Kamailio is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version
  11. *
  12. * Kamailio is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /*! \file
  22. * \brief DB_MYSQL :: Data conversions
  23. * \ingroup db_mysql
  24. * Module: \ref db_mysql
  25. */
  26. #ifndef KM_VAL_H
  27. #define KM_VAL_H
  28. #include <mysql/mysql.h>
  29. #include "../../lib/srdb1/db_val.h"
  30. #include "../../lib/srdb1/db.h"
  31. /*!
  32. * \brief Converting a value to a string
  33. *
  34. * Converting a value to a string, used when converting result from a query
  35. * \param _c database connection
  36. * \param _v source value
  37. * \param _s target string
  38. * \param _len target string length
  39. * \return 0 on success, negative on error
  40. */
  41. int db_mysql_val2str(const db1_con_t* _con, const db_val_t* _v, char* _s, int* _len);
  42. #endif