reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
PyRouteMessageHandler.hxx
Go to the documentation of this file.
1#ifndef PYROUTE_MESSAGE_HANDLER_HXX
2#define PYROUTE_MESSAGE_HANDLER_HXX
3
4/* Using the PyCXX API for C++ Python integration
5 * It is extremely convenient and avoids the need to write boilerplate
6 * code for handling the Python reference counts.
7 * It is licensed under BSD terms compatible with reSIProcate */
8#include <Python.h>
9#include <CXX/Objects.hxx>
10
14#include "repro/Processor.hxx"
15#include "repro/Proxy.hxx"
16
17namespace repro
18{
19
21{
22 public:
24 virtual ~PyRouteMessageHandler();
25
26 virtual void outboundMessage(const resip::Tuple &source, const resip::Tuple &destination, const resip::SipMessage &msg);
27 virtual void inboundMessage(const resip::Tuple& source, const resip::Tuple& destination, const resip::SipMessage &msg);
28 virtual void onMessage(bool outbound, const resip::Tuple& source, const resip::Tuple& destination, const resip::SipMessage &msg);
29
30 private:
31 resip::Dispatcher& mDispatcher;
32};
33
34};
35
36#endif
37
38/* ====================================================================
39 *
40 * Copyright (c) 2022, Software Freedom Institute https://softwarefreedom.institute
41 * Copyright (c) 2022, Daniel Pocock https://danielpocock.com
42 *
43 * Redistribution and use in source and binary forms, with or without
44 * modification, are permitted provided that the following conditions
45 * are met:
46 *
47 * 1. Redistributions of source code must retain the above copyright
48 * notice, this list of conditions and the following disclaimer.
49 *
50 * 2. Redistributions in binary form must reproduce the above copyright
51 * notice, this list of conditions and the following disclaimer in
52 * the documentation and/or other materials provided with the
53 * distribution.
54 *
55 * 3. Neither the name of the author(s) nor the names of any contributors
56 * may be used to endorse or promote products derived from this software
57 * without specific prior written permission.
58 *
59 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
60 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
61 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
62 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
63 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
64 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
69 * SUCH DAMAGE.
70 *
71 * ====================================================================
72 *
73 *
74 */
75
static Token outbound(Symbols::Outbound)
virtual void onMessage(bool outbound, const resip::Tuple &source, const resip::Tuple &destination, const resip::SipMessage &msg)
virtual void outboundMessage(const resip::Tuple &source, const resip::Tuple &destination, const resip::SipMessage &msg)
virtual void inboundMessage(const resip::Tuple &source, const resip::Tuple &destination, const resip::SipMessage &msg)
A generic thread-bank class.
Represents a SIP message.
Represents a network address.
Definition Tuple.hxx:59
This Class is used to implement a primitive form of RPC using loose XML formatting.
void list()
Definition userAdmin.cxx:66