Skip to content

Commit ac5810b

Browse files
committed
mqueue: new module
1 parent 9527f7b commit ac5810b

File tree

10 files changed

+1829
-0
lines changed

10 files changed

+1829
-0
lines changed

modules/mqueue/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# WARNING: do not run this directly, it should be run by the master Makefile
2+
3+
include ../../Makefile.defs
4+
auto_gen=
5+
NAME=mqueue.so
6+
7+
include ../../Makefile.modules

modules/mqueue/api.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* Copyright (C) 2010 Elena-Ramona Modroiu (asipto.com)
3+
*
4+
* This file is part of opensips, a free SIP server.
5+
*
6+
* This file is free software; you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation; either version 2 of the License, or
9+
* (at your option) any later version
10+
*
11+
* This file is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program; if not, write to the Free Software
18+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19+
*
20+
*/
21+
22+
23+
#ifndef _MQUEUE_EXT_API_H_
24+
#define _MQUEUE_EXT_API_H_
25+
26+
typedef int (*mq_add_f)(str *, str *, str *);
27+
typedef struct mq_api
28+
{
29+
mq_add_f add;
30+
} mq_api_t;
31+
32+
typedef int (*bind_mq_f)(mq_api_t *api);
33+
34+
static inline int load_mq_api(mq_api_t *api)
35+
{
36+
bind_mq_f bindmq;
37+
38+
bindmq = (bind_mq_f)find_export("bind_mq", 0);
39+
if(bindmq == 0) {
40+
LM_ERR("cannot find bind_mq\n");
41+
return -1;
42+
}
43+
if(bindmq(api) < 0) {
44+
LM_ERR("cannot bind mq api\n");
45+
return -1;
46+
}
47+
return 0;
48+
}
49+
50+
#endif

modules/mqueue/doc/contributors.xml

Whitespace-only changes.

modules/mqueue/doc/mqueue.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding='UTF-8'?>
2+
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3+
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4+
5+
6+
<!ENTITY admin SYSTEM "mqueue_admin.xml">
7+
<!ENTITY contrib SYSTEM "contributors.xml">
8+
9+
<!-- Include general documentation entities -->
10+
<!ENTITY % docentities SYSTEM "../../../doc/entities.xml">
11+
%docentities;
12+
13+
]>
14+
15+
<book>
16+
<bookinfo>
17+
<title>mqueue Module</title>
18+
<productname class="trade">&osipsname;</productname>
19+
</bookinfo>
20+
<toc></toc>
21+
22+
&admin;
23+
&contrib;
24+
25+
&docCopyrights;
26+
<para>&copyright; 2010 Elena-Ramona Modroiu</para>
27+
<para>&copyright; 2018-2020 Julien chavanton, Flowroute</para>
28+
<para>&copyright; 2024 Ovidiu Sas, <ulink url="http://www.voipembedded.com">VoIP Embedded, Inc.</ulink></para>
29+
</book>

0 commit comments

Comments
 (0)