Browse code

textopsx: updated to the new mod interface

Daniel-Constantin Mierla authored on 28/09/2018 06:24:28 • Victor Seva committed on 28/09/2018 11:03:26
Showing 2 changed files
... ...
@@ -1,7 +1,6 @@
1 1
 #
2 2
 # textopsx example module makefile
3 3
 #
4
-# 
5 4
 # WARNING: do not run this directly, it should be run by the master Makefile
6 5
 
7 6
 include ../../Makefile.defs
... ...
@@ -9,7 +8,5 @@ auto_gen=
9 8
 NAME=textopsx.so
10 9
 LIBS=
11 10
 
12
-DEFS+=-DSER_MOD_INTERFACE
13
-
14 11
 include ../../Makefile.modules
15 12
 
... ...
@@ -80,50 +80,51 @@ extern select_row_t sel_declaration[];
80 80
 /* cfg functions */
81 81
 /* clag-format off */
82 82
 static cmd_export_t cmds[] = {
83
-		{"msg_apply_changes", (cmd_function)msg_apply_changes_f, 0, 0,
84
-				REQUEST_ROUTE | ONREPLY_ROUTE},
85
-		{"change_reply_status", change_reply_status_f, 2,
86
-				change_reply_status_fixup, ONREPLY_ROUTE},
87
-		{"remove_body", (cmd_function)w_remove_body_f, 0, 0, ANY_ROUTE},
88
-		{"keep_hf", (cmd_function)w_keep_hf_f, 0, fixup_regexp_null, ANY_ROUTE},
89
-		{"keep_hf", (cmd_function)w_keep_hf_f, 1, fixup_regexp_null, ANY_ROUTE},
90
-		{"fnmatch", (cmd_function)w_fnmatch2_f, 2, fixup_fnmatch, ANY_ROUTE},
91
-		{"fnmatch", (cmd_function)w_fnmatch3_f, 3, fixup_fnmatch, ANY_ROUTE},
92
-
93
-		{"append_hf_value", insupddel_hf_value_f, 2, append_hf_value_fixup,
94
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
95
-		{"insert_hf_value", insupddel_hf_value_f, 2, insert_hf_value_fixup,
96
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
97
-		{"remove_hf_value", insupddel_hf_value_f, 1, remove_hf_value_fixup,
98
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
99
-		{"assign_hf_value", insupddel_hf_value_f, 2, assign_hf_value_fixup,
100
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
101
-		{"remove_hf_value2", insupddel_hf_value_f, 1, remove_hf_value2_fixup,
102
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
103
-		{"assign_hf_value2", insupddel_hf_value_f, 2, assign_hf_value2_fixup,
104
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
105
-		{"include_hf_value", incexc_hf_value_f, 2, include_hf_value_fixup,
106
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
107
-		{"exclude_hf_value", incexc_hf_value_f, 2, exclude_hf_value_fixup,
108
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
109
-		{"hf_value_exists", incexc_hf_value_f, 2, hf_value_exists_fixup,
110
-				REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
111
-
112
-		{"bind_textopsx", (cmd_function)bind_textopsx, 1, 0, ANY_ROUTE},
113
-
114
-
115
-		{0, 0, 0, 0, 0}};
83
+	{"msg_apply_changes", (cmd_function)msg_apply_changes_f, 0, 0, 0,
84
+			REQUEST_ROUTE | ONREPLY_ROUTE},
85
+	{"change_reply_status", change_reply_status_f, 2,
86
+			change_reply_status_fixup, 0, ONREPLY_ROUTE},
87
+	{"remove_body", (cmd_function)w_remove_body_f, 0, 0, 0, ANY_ROUTE},
88
+	{"keep_hf", (cmd_function)w_keep_hf_f, 0, fixup_regexp_null, 0, ANY_ROUTE},
89
+	{"keep_hf", (cmd_function)w_keep_hf_f, 1, fixup_regexp_null, 0, ANY_ROUTE},
90
+	{"fnmatch", (cmd_function)w_fnmatch2_f, 2, fixup_fnmatch, 0, ANY_ROUTE},
91
+	{"fnmatch", (cmd_function)w_fnmatch3_f, 3, fixup_fnmatch, 0, ANY_ROUTE},
92
+	{"append_hf_value", insupddel_hf_value_f, 2, append_hf_value_fixup, 0,
93
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
94
+	{"insert_hf_value", insupddel_hf_value_f, 2, insert_hf_value_fixup, 0,
95
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
96
+	{"remove_hf_value", insupddel_hf_value_f, 1, remove_hf_value_fixup, 0,
97
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
98
+	{"assign_hf_value", insupddel_hf_value_f, 2, assign_hf_value_fixup, 0,
99
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
100
+	{"remove_hf_value2", insupddel_hf_value_f, 1, remove_hf_value2_fixup, 0,
101
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
102
+	{"assign_hf_value2", insupddel_hf_value_f, 2, assign_hf_value2_fixup, 0,
103
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
104
+	{"include_hf_value", incexc_hf_value_f, 2, include_hf_value_fixup, 0,
105
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
106
+	{"exclude_hf_value", incexc_hf_value_f, 2, exclude_hf_value_fixup, 0,
107
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
108
+	{"hf_value_exists", incexc_hf_value_f, 2, hf_value_exists_fixup, 0,
109
+			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
110
+
111
+	{"bind_textopsx", (cmd_function)bind_textopsx, 1, 0, 0, ANY_ROUTE},
112
+
113
+	{0, 0, 0, 0, 0, 0}
114
+};
116 115
 
117 116
 /* module exports structure */
118 117
 struct module_exports exports = {
119
-		"textopsx", cmds, /* cfg functions */
120
-		0,				  /* RPC methods */
121
-		0,				  /* cfg parameters */
122
-		mod_init,		  /* initialization function */
123
-		0,				  /* response function */
124
-		0,				  /* destroy function */
125
-		0,				  /* on_cancel function */
126
-		0				  /* per-child init function */
118
+	"textopsx",		/* module name */
119
+	DEFAULT_DLFLAGS,	/* dlopen flags */
120
+	cmds,			/* exported cfg functions */
121
+	0,				/* exported cfg parameters */
122
+	0,				/* exported RPC methods */
123
+	0,				/* exported pseudo-variables */
124
+	0,				/* response handling function */
125
+	mod_init,		/* module init function */
126
+	0,				/* per-child init function */
127
+	0,				/* destroy function */
127 128
 };
128 129
 /* clag-format on */
129 130