reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ExamplePlugin.cxx
Go to the documentation of this file.
1
2#include "rutil/Logger.hxx"
3#include "repro/Plugin.hxx"
4
5#define RESIPROCATE_SUBSYSTEM resip::Subsystem::REPRO
6
7using namespace resip;
8using namespace repro;
9
11{
12 public:
15
16 virtual bool init(SipStack& sipStack, ProxyConfig *proxyConfig)
17 {
18 DebugLog(<<"ExamplePlugin: init called");
19 return true;
20 }
21
23 {
24 DebugLog(<<"ExamplePlugin: onRequestProcessorChainPopulated called");
25 }
26
28 {
29 DebugLog(<<"ExamplePlugin: onResponseProcessorChainPopulated called");
30 }
31
33 {
34 DebugLog(<<"ExamplePlugin: onTargetProcessorChainPopulated called");
35 }
36
37 virtual void onReload()
38 {
39 DebugLog(<<"ExamplePlugin: onReload called");
40 }
41
42};
43
44
45extern "C" {
46
47static
48std::shared_ptr<resip::Plugin> instantiate()
49{
50 return std::make_shared<ExamplePlugin>();
51}
52
58
59};
60
61/* ====================================================================
62 *
63 * Copyright (c) 2022, Software Freedom Institute https://softwarefreedom.institute
64 * Copyright (c) 2013-2022, Daniel Pocock https://danielpocock.com
65 *
66 * Redistribution and use in source and binary forms, with or without
67 * modification, are permitted provided that the following conditions
68 * are met:
69 *
70 * 1. Redistributions of source code must retain the above copyright
71 * notice, this list of conditions and the following disclaimer.
72 *
73 * 2. Redistributions in binary form must reproduce the above copyright
74 * notice, this list of conditions and the following disclaimer in
75 * the documentation and/or other materials provided with the
76 * distribution.
77 *
78 * 3. Neither the name of the author(s) nor the names of any contributors
79 * may be used to endorse or promote products derived from this software
80 * without specific prior written permission.
81 *
82 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
83 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
84 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
85 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
86 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
87 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
88 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
89 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
90 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
91 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
92 * SUCH DAMAGE.
93 *
94 * ====================================================================
95 *
96 *
97 */
98
PluginDescriptor reproPluginDesc
static std::shared_ptr< resip::Plugin > instantiate()
#define DebugLog(args_)
Definition Logger.hxx:128
virtual bool init(SipStack &sipStack, ProxyConfig *proxyConfig)
virtual void onTargetProcessorChainPopulated(ProcessorChain &chain)
virtual void onResponseProcessorChainPopulated(ProcessorChain &chain)
virtual void onRequestProcessorChainPopulated(ProcessorChain &chain)
virtual void onReload()
This is the primary point of interaction between the app-layer and the stack.
Definition SipStack.hxx:160
This Class is used to implement a primitive form of RPC using loose XML formatting.
dcm! – add UnusedChecking(_enum) below;
#define REPRO_DSO_PLUGIN_API_VERSION
Definition Plugin.hxx:38