Browse code

core, lib, modules: updated include paths for header files

Daniel-Constantin Mierla authored on 07/12/2016 11:07:22
Showing 1 changed files
... ...
@@ -23,8 +23,8 @@
23 23
 
24 24
 /* necessary includes */
25 25
 #include "../../lib/srdb1/db.h"
26
-#include "../../str.h"
27
-#include "../../ut.h"
26
+#include "../../core/str.h"
27
+#include "../../core/ut.h"
28 28
 
29 29
 #include <string.h>
30 30
 
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,79 @@
1
+
2
+/*!
3
+ * \file
4
+ * \ingroup db
5
+ * \brief Database support for modules.
6
+ *
7
+ * Database support functions for modules.
8
+ *
9
+ * @cond
10
+ * WARNING:
11
+ * This file was autogenerated from the XML source file
12
+ * ../../modules/matrix/kamailio-matrix.xml.
13
+ * It can be regenerated by running 'make modules' in the db/schema
14
+ * directory of the source code. You need to have xsltproc and
15
+ * docbook-xsl stylesheets installed.
16
+ * ALL CHANGES DONE HERE WILL BE LOST IF THE FILE IS REGENERATED
17
+ * @endcond
18
+ */
19
+
20
+#ifndef db_matrix_h
21
+#define db_matrix_h
22
+
23
+
24
+/* necessary includes */
25
+#include "../../lib/srdb1/db.h"
26
+#include "../../str.h"
27
+#include "../../ut.h"
28
+
29
+#include <string.h>
30
+
31
+
32
+/* database variables */
33
+
34
+extern str matrix_db_url;
35
+extern db1_con_t * matrix_dbh;
36
+extern db_func_t matrix_dbf;
37
+
38
+#define matrix_DB_URL { "db_url", PARAM_STR, &matrix_db_url },
39
+
40
+#define matrix_DB_TABLE { "matrix_table", PARAM_STR, &matrix_table },
41
+
42
+extern str matrix_table;
43
+
44
+/* column names */
45
+extern str matrix_first_col;
46
+extern str matrix_second_col;
47
+extern str matrix_res_col;
48
+#define matrix_DB_COLS \
49
+{ "matrix_first_col", PARAM_STR, &matrix_first_col }, \
50
+{ "matrix_second_col", PARAM_STR, &matrix_second_col }, \
51
+{ "matrix_res_col", PARAM_STR, &matrix_res_col }, \
52
+
53
+/* table version */
54
+extern const unsigned int matrix_version;
55
+
56
+
57
+/*
58
+ * Closes the DB connection.
59
+ */
60
+void matrix_db_close(void);
61
+
62
+/*!
63
+ * Initialises the DB API, check the table version and closes the connection.
64
+ * This should be called from the mod_init function.
65
+ *
66
+ * \return 0 means ok, -1 means an error occurred.
67
+ */
68
+int matrix_db_init(void);
69
+
70
+/*!
71
+ * Initialize the DB connection without checking the table version and DB URL.
72
+ * This should be called from child_init. An already existing database
73
+ * connection will be closed, and a new one created.
74
+ *
75
+ * \return 0 means ok, -1 means an error occurred.
76
+ */
77
+int matrix_db_open(void);
78
+
79
+#endif