Yate
SignallingCall Class Referenceabstract

Abstract single phone call. More...

#include <yatesig.h>

Inheritance diagram for SignallingCall:
RefObject Mutex GenObject Lockable ISDNQ931Call ISDNQ931CallMonitor SS7ISUPCall

Public Member Functions

 SignallingCall (SignallingCallControl *controller, bool outgoing, bool signalOnly=false)
 
virtual ~SignallingCall ()
 
bool outgoing () const
 
SignallingCallControlcontroller () const
 
void userdata (void *data)
 
void * userdata () const
 
bool signalOnly () const
 
bool overlapDialing () const
 
virtual bool sendEvent (SignallingEvent *event)
 
virtual SignallingEventgetEvent (const Time &when)=0
 
virtual void eventTerminated (SignallingEvent *event)
 
- Public Member Functions inherited from RefObject
 RefObject ()
 
virtual ~RefObject ()
 
virtual void * getObject (const String &name) const
 
virtual bool alive () const
 
bool ref ()
 
bool deref ()
 
int refcount () const
 
virtual void destruct ()
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from Mutex
 Mutex (bool recursive=false, const char *name=0)
 
 Mutex (const Mutex &original)
 
 ~Mutex ()
 
Mutexoperator= (const Mutex &original)
 
virtual bool lock (long maxwait=-1)
 
virtual bool unlock ()
 
virtual bool locked () const
 
const char * owner () const
 
bool recursive () const
 
- Public Member Functions inherited from Lockable
virtual ~Lockable ()
 
virtual bool check (long maxwait=-1)
 
virtual bool unlockAll ()
 

Protected Member Functions

void enqueue (SignallingMessage *msg)
 
SignallingMessagedequeue (bool remove=true)
 
void clearQueue ()
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
virtual void destroyed ()
 

Protected Attributes

SignallingEventm_lastEvent
 
bool m_overlap
 

Additional Inherited Members

- Static Public Member Functions inherited from RefObject
static bool alive (const RefObject *obj)
 
static bool efficientIncDec ()
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 
- Static Public Member Functions inherited from Mutex
static int count ()
 
static int locks ()
 
static bool efficientTimedLock ()
 
- Static Public Member Functions inherited from Lockable
static void wait (unsigned long maxwait)
 
static unsigned long wait ()
 
static void startUsingNow ()
 
static void enableSafety (bool safe=true)
 
static bool safety ()
 

Detailed Description

Abstract single phone call.

Interface of protocol independent phone call

Constructor & Destructor Documentation

◆ SignallingCall()

SignallingCall ( SignallingCallControl * controller,
bool outgoing,
bool signalOnly = false )

Constructor

Parameters
controllerThe call controller owning this call
outgoingCall direction (true for outgoing)
signalOnlyJust signalling (no voice) flag

References controller(), outgoing(), and signalOnly().

◆ ~SignallingCall()

virtual ~SignallingCall ( )
virtual

Destructor, notifies the controller

Member Function Documentation

◆ clearQueue()

void clearQueue ( )
inlineprotected

Clear incoming messages queue

References Mutex::lock().

◆ controller()

SignallingCallControl * controller ( ) const
inline

◆ dequeue()

SignallingMessage * dequeue ( bool remove = true)
protected

Dequeue a received message. Just return it if remove is false This method is thread safe

Parameters
removeTrue to remove the message from queue
Returns
SignallingMessage pointer or 0 if no more messages

◆ enqueue()

void enqueue ( SignallingMessage * msg)
protected

Enqueue a received message. This method is thread safe

Parameters
msgThe received message

◆ eventTerminated()

virtual void eventTerminated ( SignallingEvent * event)
virtual

Event terminated notification. No event will be generated until the current event is terminated This method is thread safe

Parameters
eventThe terminated event

◆ getEvent()

virtual SignallingEvent * getEvent ( const Time & when)
pure virtual

Get an event from this call if not already got one This method is thread safe

Parameters
whenThe current time
Returns
SignallingEvent pointer or 0 if no events or this call has a not terminated event

Implemented in ISDNQ931Call, ISDNQ931CallMonitor, and SS7ISUPCall.

◆ outgoing()

bool outgoing ( ) const
inline

Check if this is an outgoing call

Returns
True if it's an outgoing call

Referenced by ISDNQ931Call::ISDNQ931Call(), SignallingCall(), SS7ISUPCall::SS7ISUPCall(), and SS7ISUPCall::stopWaitSegment().

◆ overlapDialing()

bool overlapDialing ( ) const
inline

Check if this call is in overlapped send/recv state

Returns
True if this call is expecting more digits to be sent/received

References m_overlap.

◆ sendEvent()

virtual bool sendEvent ( SignallingEvent * event)
inlinevirtual

Send an event to this call

Parameters
eventThe event to send
Returns
True if the operation succedded

Reimplemented in ISDNQ931Call, and SS7ISUPCall.

◆ signalOnly()

bool signalOnly ( ) const
inline

Check if this call is just a signalling (no voice) one

Returns
True if no audio data can be negotiated for this call

Referenced by SignallingCall().

◆ userdata() [1/2]

void * userdata ( ) const
inline

Retreive the private user data of this call

Returns
User data

◆ userdata() [2/2]

void userdata ( void * data)
inline

Set this call's private user data

Parameters
dataNew user data

Member Data Documentation

◆ m_lastEvent

SignallingEvent* m_lastEvent
protected

Last event generated by this call. Used to serialize events

◆ m_overlap

bool m_overlap
protected

Call is in overlapped send/recv state

Referenced by overlapDialing().


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