EmergencyNotify Class Reference

#include <EmergencyNotify.h>

Inheritance diagram for EmergencyNotify:

AuthPlugin Plugin

List of all members.


Detailed Description

This is an AuthRules plugin called by SipRouter.

Its job is to generate a notification when an emergency number is dialled.

Public Member Functions

virtual ~EmergencyNotify ()
 destructor
virtual AuthResult authorizeAndModify (const UtlString &id, const Url &requestUri, RouteState &routeState, const UtlString &method, AuthResult priorResult, SipMessage &request, bool bSpiralingRequest, UtlString &reason)
 Called for any request - generates a notification when an emergency number is dialled.
virtual void readConfig (OsConfigDb &configDb)
 Read (or re-read) the authorization rules.

Protected Member Functions

bool getMatchedRule (const Url &requestUri, UtlString &rNameStr, UtlString &rDescriptionStr) const

Private Member Functions

 EmergencyNotify (const UtlString &instanceName)
 Constructor - private so that only the factory can call it.

Private Attributes

OsRWMutex mRulesLock
EmergencyRulesUrlMappingmpEmergencyRules

Friends

class EmergencyRulesTest
AuthPlugingetAuthPlugin (const UtlString &name)
 Factory used by PluginHooks to dynamically link the plugin instance.


Constructor & Destructor Documentation

~EmergencyNotify (  )  [virtual]

destructor

EmergencyNotify ( const UtlString instanceName  )  [private]

Constructor - private so that only the factory can call it.

constructor

Parameters:
instanceName  the configured name for this plugin instance


Member Function Documentation

AuthPlugin::AuthResult authorizeAndModify ( const UtlString id,
const Url requestUri,
RouteState routeState,
const UtlString method,
AuthResult  priorResult,
SipMessage request,
bool  bSpiralingRequest,
UtlString reason 
) [virtual]

Called for any request - generates a notification when an emergency number is dialled.

Parameters:
id  The authenticated identity of the request originator, if any (the null string if not). This is in the form of a SIP uri identity value as used in the credentials database (user) without the scheme or any parameters.
requestUri  parsed target Uri
routeState  the state for this request.
method  the request method
priorResult  results from earlier plugins.
request  see AuthPlugin regarding modifying
reason  rejection reason

Implements AuthPlugin.

void readConfig ( OsConfigDb configDb  )  [virtual]

Read (or re-read) the authorization rules.

Note:
The parent service may call the readConfig method at any time to indicate that the configuration may have changed. The plugin should reinitialize itself based on the configuration that exists when this is called. The fact that it is a subhash means that whatever prefix is used to identify the plugin (see PluginHooks) has been removed (see the examples in PluginHooks::readConfig).
Parameters:
configDb  a subhash of the individual configuration parameters for this instance of this plugin.

Implements AuthPlugin.

bool getMatchedRule ( const Url requestUri,
UtlString rNameStr,
UtlString rDescriptionStr 
) const [protected]

Parameters:
requestUri  target to check
rNameStr  name of the rule that matched
rDescriptionStr  description of the rule that matched


Friends And Related Function Documentation

friend class EmergencyRulesTest [friend]

AuthPlugin* getAuthPlugin ( const UtlString name  )  [friend]

Factory used by PluginHooks to dynamically link the plugin instance.


Member Data Documentation

OsRWMutex mRulesLock [private]


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:50:17 build33 abuild