SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
sipwitch::service::callback Class Reference

Callback methods for objects managed under the service thread. More...

#include <service.h>

Inheritance diagram for sipwitch::service::callback:
Inheritance graph
[legend]
Collaboration diagram for sipwitch::service::callback:
Collaboration graph
[legend]

Public Member Functions

voip::context_t getContext (const char *uri)
 

Static Public Member Functions

static void bind (unsigned short port)
 
static void setPublic (void)
 
static void bind (const char *addr)
 

Static Public Attributes

static voip::context_t out_context = NULL
 
static voip::context_t tcp_context = NULL
 
static voip::context_t udp_context = NULL
 
static voip::context_t tls_context = NULL
 

Protected Member Functions

 callback (int level=0)
 
virtual ~callback ()
 
bool is_active (void) const
 
virtual void cdrlog (cdr *call)
 
virtual void errlog (shell::loglevel_t level, const char *text)
 
virtual bool check (void)
 
virtual void snapshot (FILE *fp)
 
virtual void start (service *cfg)
 
virtual void stop (service *cfg)
 
virtual void reload (service *cfg)
 
virtual void publish (service *cfg)
 

Static Protected Member Functions

static void * alloc (service *cfgp, size_t size)
 
static char * dup (service *cfgp, const char *s)
 
static bool is_configured (void)
 

Protected Attributes

unsigned runlevel
 
bool active_flag
 

Static Protected Attributes

static LinkedObjectrunlevels [4] = {NULL, NULL, NULL, NULL}
 
static unsigned count = 0
 
static unsigned short sip_port = 5060
 
static const char * sip_iface = NULL
 
static volatile char * sip_contact = NULL
 
static volatile char * sip_publish = NULL
 
static int sip_protocol = IPPROTO_UDP
 
static int sip_family = AF_INET
 
static int sip_tlsmode = 0
 
static bool sip_public = false
 
static const char * sip_domain = NULL
 
static const char * sip_realm = "unknown"
 
static const char * sip_tlspwd = ""
 
static const char * sip_tlsdev = "/dev/random"
 
static const char * sip_tlsca = "/etc/ssl/ca.pem"
 
static const char * sip_tlsdh = "/etc/ssl/dh1024.pem"
 
static const char * sip_tlskey = "/etc/ssl/private/sipwitch.key"
 
static const char * sip_tlscert = "/etc/ssl/sipwitch.pem"
 
static unsigned sip_prefix = 0
 
static unsigned sip_range = 0
 
static char session_uuid [40]
 

Friends

class service
 
class modules
 
class events
 
class srv
 

Detailed Description

Callback methods for objects managed under the service thread.

This ultimately includes plugin modules. Since it is used as a base class for all plugin services, it is also a place to pass common config info in the server that needs to be directly accessible by plugins.

Definition at line 175 of file service.h.

Constructor & Destructor Documentation

callback::callback ( int  level = 0)
protected

Definition at line 143 of file service.cpp.

callback::~callback ( )
protectedvirtual

Definition at line 157 of file service.cpp.

Member Function Documentation

static void* sipwitch::service::callback::alloc ( service cfgp,
size_t  size 
)
inlinestaticprotected

Definition at line 211 of file service.h.

static void sipwitch::service::callback::bind ( unsigned short  port)
inlinestatic

Definition at line 238 of file service.h.

void callback::bind ( const char *  addr)
static

Definition at line 215 of file service.cpp.

void callback::cdrlog ( cdr call)
protectedvirtual

Definition at line 195 of file service.cpp.

bool callback::check ( void  )
protectedvirtual

Reimplemented in sipwitch::messages, sipwitch::stack, and sipwitch::registry.

Definition at line 186 of file service.cpp.

static char* sipwitch::service::callback::dup ( service cfgp,
const char *  s 
)
inlinestaticprotected

Definition at line 214 of file service.h.

void callback::errlog ( shell::loglevel_t  level,
const char *  text 
)
protectedvirtual

Definition at line 191 of file service.cpp.

voip::context_t callback::getContext ( const char *  uri)

Definition at line 162 of file service.cpp.

bool sipwitch::service::callback::is_active ( void  ) const
inlineprotected

Definition at line 220 of file service.h.

static bool sipwitch::service::callback::is_configured ( void  )
inlinestaticprotected

Definition at line 217 of file service.h.

void callback::publish ( service cfg)
protectedvirtual

Definition at line 203 of file service.cpp.

void callback::reload ( service cfg)
protectedvirtual
static void sipwitch::service::callback::setPublic ( void  )
inlinestatic

Definition at line 241 of file service.h.

void callback::snapshot ( FILE *  fp)
protectedvirtual

Reimplemented in sipwitch::messages, sipwitch::stack, and sipwitch::registry.

Definition at line 182 of file service.cpp.

void callback::start ( service cfg)
protectedvirtual
void callback::stop ( service cfg)
protectedvirtual

Reimplemented in sipwitch::media, sipwitch::stack, and sipwitch::registry.

Definition at line 211 of file service.cpp.

Friends And Related Function Documentation

friend class events
friend

Definition at line 180 of file service.h.

friend class modules
friend

Definition at line 179 of file service.h.

friend class service
friend

Definition at line 178 of file service.h.

friend class srv
friend

Definition at line 181 of file service.h.

Field Documentation

bool sipwitch::service::callback::active_flag
protected

Definition at line 184 of file service.h.

unsigned callback::count = 0
staticprotected

Definition at line 187 of file service.h.

voip::context_t callback::out_context = NULL
static

Definition at line 233 of file service.h.

unsigned sipwitch::service::callback::runlevel
protected

Definition at line 183 of file service.h.

LinkedObject * callback::runlevels = {NULL, NULL, NULL, NULL}
staticprotected

Definition at line 186 of file service.h.

char callback::session_uuid
staticprotected

Definition at line 206 of file service.h.

volatile char * callback::sip_contact = NULL
staticprotected

Definition at line 190 of file service.h.

const char * callback::sip_domain = NULL
staticprotected

Definition at line 196 of file service.h.

int callback::sip_family = AF_INET
staticprotected

Definition at line 193 of file service.h.

const char * callback::sip_iface = NULL
staticprotected

Definition at line 189 of file service.h.

unsigned short callback::sip_port = 5060
staticprotected

Definition at line 188 of file service.h.

unsigned callback::sip_prefix = 0
staticprotected

Definition at line 204 of file service.h.

int callback::sip_protocol = IPPROTO_UDP
staticprotected

Definition at line 192 of file service.h.

bool callback::sip_public = false
staticprotected

Definition at line 195 of file service.h.

volatile char * callback::sip_publish = NULL
staticprotected

Definition at line 191 of file service.h.

unsigned callback::sip_range = 0
staticprotected

Definition at line 205 of file service.h.

const char * callback::sip_realm = "unknown"
staticprotected

Definition at line 197 of file service.h.

const char * callback::sip_tlsca = "/etc/ssl/ca.pem"
staticprotected

Definition at line 200 of file service.h.

const char * callback::sip_tlscert = "/etc/ssl/sipwitch.pem"
staticprotected

Definition at line 203 of file service.h.

const char * callback::sip_tlsdev = "/dev/random"
staticprotected

Definition at line 199 of file service.h.

const char * callback::sip_tlsdh = "/etc/ssl/dh1024.pem"
staticprotected

Definition at line 201 of file service.h.

const char * callback::sip_tlskey = "/etc/ssl/private/sipwitch.key"
staticprotected

Definition at line 202 of file service.h.

int callback::sip_tlsmode = 0
staticprotected

Definition at line 194 of file service.h.

const char * callback::sip_tlspwd = ""
staticprotected

Definition at line 198 of file service.h.

voip::context_t callback::tcp_context = NULL
static

Definition at line 234 of file service.h.

voip::context_t callback::tls_context = NULL
static

Definition at line 236 of file service.h.

voip::context_t callback::udp_context = NULL
static

Definition at line 235 of file service.h.


The documentation for this class was generated from the following files: