1 // Copyright (C) 2006-2014 David Sugar, Tycho Softworks.
2 // Copyright (C) 2015 Cherokees of Idaho.
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16
22 #ifndef _SIPWITCH_MODULES_H_
23 #define _SIPWITCH_MODULES_H_
24
25 #ifndef _UCOMMON_STRING_H_
26 #include <ucommon/string.h>
27 #endif
28
29 #ifndef __SIPWITCH_VOIP_H_
31 #endif
32
33 #ifndef __SIPWITCH_SERVICE_H_
35 #endif
36
37 #ifndef __SIPWITCH_CDR_H_
39 #endif
40
41 #ifndef _SIPWITCH_CONTROL_H_
43 #endif
44
45 #ifndef _SIPWITCH_URI_H_
47 #endif
48
49 namespace sipwitch {
50
56 {
57 public:
58 typedef enum {REG_FAILED, REG_SUCCESS} regmode_t;
59
67 {
68 protected:
74
75 public:
83 virtual void period(long slice);
84
94 virtual bool announce(
MappedRegistry *user,
const char *type,
const char *event,
const char *expires,
const char *body);
95
101
107
117
125 virtual bool authenticate(
voip::reg_t id,
const char *realm);
126
137 virtual char *referLocal(
MappedRegistry *user,
const char *target,
char *buffer,
size_t size);
138
149 virtual char *referRemote(
MappedRegistry *user,
const char *target,
char *buffer,
size_t size);
150 };
151
160 {
161 protected:
165 generic();
166
167 public:
174 virtual srv::address *resolve(
const char *
uri,
struct addrinfo *hints);
175 };
176
183 static void cdrlog(FILE *file,
cdr *call);
184
191 static void errlog(shell::loglevel_t level, const char *text);
192 };
193
194 } // namespace sipwitch
195
196 #endif
Some convenience methods for manipulating SIP uri's.
Representation of a mapped active user record.
Manipulate address strings.
Basic server call detail record.
A more generic service class for use by plugins.
Callback methods for objects managed under the service thread.
Service configuration and component callbacks.
Manage control interface.
Interface class for call detail records.
Common interfaces and clases for plugins.
Common base class for sipwitch plugin services.