Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,103 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ * Oracle module core functions
5
+ *
6
+ * Copyright (C) 2007,2008 TRUNK MOBILE
7
+ *
8
+ * This file is part of Kamailio, a free SIP server.
9
+ *
10
+ * Kamailio is free software; you can redistribute it and/or modify
11
+ * it under the terms of the GNU General Public License as published by
12
+ * the Free Software Foundation; either version 2 of the License, or
13
+ * (at your option) any later version
14
+ *
15
+ * Kamailio is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
+ * GNU General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU General Public License
21
+ * along with this program; if not, write to the Free Software
22
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23
+ */
24
+
25
+
26
+#ifndef DBASE_H
27
+#define DBASE_H
28
+
29
+
30
+#include "../../lib/srdb1/db_con.h"
31
+#include "../../lib/srdb1/db_res.h"
32
+#include "../../lib/srdb1/db_key.h"
33
+#include "../../lib/srdb1/db_op.h"
34
+#include "../../lib/srdb1/db_val.h"
35
+
36
+
37
+/*
38
+ * Initialize database connection
39
+ */
40
+db1_con_t* db_oracle_init(const str* _sqlurl);
41
+
42
+
43
+/*
44
+ * Close a database connection
45
+ */
46
+void db_oracle_close(db1_con_t* _h);
47
+
48
+
49
+/*
50
+ * Free all memory allocated by get_result
51
+ */
52
+int db_oracle_free_result(db1_con_t* _h, db1_res_t* _r);
53
+
54
+
55
+/*
56
+ * Do a query
57
+ */
58
+int db_oracle_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
59
+		const db_val_t* _v, const db_key_t* _c, int _n, int _nc,
60
+		const db_key_t _o, db1_res_t** _r);
61
+
62
+
63
+/*
64
+ * Raw SQL query
65
+ */
66
+int db_oracle_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r);
67
+
68
+
69
+/*
70
+ * Insert a row into table
71
+ */
72
+int db_oracle_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
73
+		int _n);
74
+
75
+
76
+/*
77
+ * Delete a row from table
78
+ */
79
+int db_oracle_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
80
+		const db_val_t* _v, int _n);
81
+
82
+
83
+/*
84
+ * Update a row in table
85
+ */
86
+int db_oracle_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
87
+		const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv,
88
+		int _n, int _un);
89
+
90
+
91
+/*
92
+ * Store name of table that will be used by
93
+ * subsequent database functions
94
+ */
95
+int db_oracle_use_table(db1_con_t* _h, const str* _t);
96
+
97
+
98
+/*
99
+ * Make error message. Always return negative value
100
+ */
101
+int sql_buf_small(void);
102
+
103
+#endif /* DBASE_H */