db_con.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2001-2003 FhG Fokus
  5. * Copyright (C) 2007-2008 1&1 Internet AG
  6. *
  7. * This file is part of Kamailio, a free SIP server.
  8. *
  9. * Kamailio is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version
  13. *
  14. * Kamailio is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. */
  23. /*!
  24. * \file lib/srdb1/db_con.h
  25. * \ingroup db1
  26. * \brief Type that represents a database connection
  27. */
  28. #ifndef DB1_CON_H
  29. #define DB1_CON_H
  30. #include "../../str.h"
  31. /*! \brief
  32. * This structure represents a database connection, pointer to this structure
  33. * are used as a connection handle from modules uses the db API.
  34. */
  35. typedef struct {
  36. const str* table; /*!< Default table that should be used */
  37. unsigned long tail; /*!< Variable length tail, database module specific */
  38. } db1_con_t;
  39. /** Return the table of the connection handle */
  40. #define CON_TABLE(cn) ((cn)->table)
  41. /** Return the tail of the connection handle */
  42. #define CON_TAIL(cn) ((cn)->tail)
  43. #endif /* DB1_CON_H */