val.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2007,2008 TRUNK MOBILE
  5. *
  6. * This file is part of Kamailio, a free SIP server.
  7. *
  8. * Kamailio is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version
  12. *
  13. * Kamailio is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. #ifndef VAL_H
  23. #define VAL_H
  24. #include <oci.h>
  25. #include "../../lib/srdb1/db_val.h"
  26. #include "../../lib/srdb1/db.h"
  27. struct bmap_t {
  28. dvoid *addr;
  29. ub4 size;
  30. ub2 type;
  31. };
  32. typedef struct bmap_t bmap_t;
  33. /*
  34. * Convert value to sql-string as db bind index
  35. */
  36. int db_oracle_val2str(const db1_con_t* _con, const db_val_t* _v, char* _s, int* _len);
  37. /*
  38. * Called after val2str to realy binding
  39. */
  40. int db_oracle_val2bind(bmap_t* _m, const db_val_t* _v, OCIDate* _o);
  41. #endif /* VAL_H */