Skip to content

Commit

Permalink
mqueue: new module
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiusas committed Feb 1, 2024
1 parent 9527f7b commit ac5810b
Show file tree
Hide file tree
Showing 10 changed files with 1,829 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/mqueue/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# WARNING: do not run this directly, it should be run by the master Makefile

include ../../Makefile.defs
auto_gen=
NAME=mqueue.so

include ../../Makefile.modules
50 changes: 50 additions & 0 deletions modules/mqueue/api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* Copyright (C) 2010 Elena-Ramona Modroiu (asipto.com)
*
* This file is part of opensips, a free SIP server.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/


#ifndef _MQUEUE_EXT_API_H_
#define _MQUEUE_EXT_API_H_

typedef int (*mq_add_f)(str *, str *, str *);
typedef struct mq_api
{
mq_add_f add;
} mq_api_t;

typedef int (*bind_mq_f)(mq_api_t *api);

static inline int load_mq_api(mq_api_t *api)
{
bind_mq_f bindmq;

bindmq = (bind_mq_f)find_export("bind_mq", 0);
if(bindmq == 0) {
LM_ERR("cannot find bind_mq\n");
return -1;
}
if(bindmq(api) < 0) {
LM_ERR("cannot bind mq api\n");
return -1;
}
return 0;
}

#endif
Empty file.
29 changes: 29 additions & 0 deletions modules/mqueue/doc/mqueue.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding='UTF-8'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [


<!ENTITY admin SYSTEM "mqueue_admin.xml">
<!ENTITY contrib SYSTEM "contributors.xml">

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../doc/entities.xml">
%docentities;

]>

<book>
<bookinfo>
<title>mqueue Module</title>
<productname class="trade">&osipsname;</productname>
</bookinfo>
<toc></toc>

&admin;
&contrib;

&docCopyrights;
<para>&copyright; 2010 Elena-Ramona Modroiu</para>
<para>&copyright; 2018-2020 Julien chavanton, Flowroute</para>
<para>&copyright; 2024 Ovidiu Sas, <ulink url="http://www.voipembedded.com">VoIP Embedded, Inc.</ulink></para>
</book>
Loading

0 comments on commit ac5810b

Please sign in to comment.