res.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * $Id$
  3. *
  4. * Postgres module result related functions
  5. *
  6. * Portions Copyright (C) 2001-2003 FhG FOKUS
  7. * Copyright (C) 2003 August.Net Services,, LLC
  8. * Portions Copyright (C) iptelorg GmbH
  9. *
  10. * This file is part of ser, a free SIP server.
  11. *
  12. * ser is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation; either version 2 of the License, or
  15. * (at your option) any later version
  16. *
  17. * For a license to use the ser software under conditions
  18. * other than those described here, or to purchase support for this
  19. * software, please contact iptel.org by e-mail at the following addresses:
  20. * [email protected]
  21. *
  22. * ser is distributed in the hope that it will be useful,
  23. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. * GNU General Public License for more details.
  26. *
  27. * You should have received a copy of the GNU General Public License
  28. * along with this program; if not, write to the Free Software
  29. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  30. */
  31. #ifndef _RES_H
  32. #define _RES_H
  33. #include <libpq-fe.h>
  34. #include "../../db/db_res.h"
  35. #include "../../db/db_con.h"
  36. /*
  37. * Create a new result structure and initialize it
  38. */
  39. db_res_t* pg_new_result(PGresult* pgres);
  40. /*
  41. * Fill the structure with data from database
  42. */
  43. int pg_convert_result(db_res_t* res, db_con_t* con);
  44. /*
  45. * Release memory used by a result structure
  46. */
  47. int pg_free_result(db_res_t* res);
  48. #endif /* _RES_H */