Yate

- Main Page
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Classes | Typedefs | Enumerations | Functions
TelEngine Namespace Reference

## Classes
class | Array
| A list based Array. More...
class | Atom
| Atom string holder. More...
class | Base64
| Base64 encoder/decoder class. More...
class | BitVector
| A slice vector holding bits. More...
class | CallAccount
| Settings for an account handling calls. More...
class | CallEndpoint
| An abstract call endpoint. More...
class | CapturedEvent
| A captured event string with a debug level. More...
class | Channel
| An abstract communication channel. More...
class | Cipher
| An abstract cipher. More...
class | Client
| Class that runs the User Interface. More...
class | ClientAccount
| An account. More...
class | ClientAccountList
| A client account list. More...
class | ClientChannel
| Channel used by client programs. More...
class | ClientContact
| A client contact. More...
class | ClientDir
| A directory. More...
class | ClientDriver
| Base Driver with client specific functions. More...
class | ClientFile
| A file. More...
class | ClientFileItem
| A file/directory item. More...
class | ClientLogic
| Base class for all client logics. More...
class | ClientResource
| A client contact's resource. More...
class | ClientSound
| A sound file. More...
class | Complex
| A Complex (float) number. More...
class | Compressor
| An abstract data (de)compressor. More...
class | Configuration
| Configuration file handling. More...
class | DataBlock
| A class that holds just a block of raw data. More...
class | DataConsumer
class | DataEndpoint
| A data transfer endpoint capable of sending and/or receiving data. More...
class | DataFormat
| A Data format. More...
class | DataNode
class | DataSource
class | DataTranslator
| An unidirectional data translator (codec) More...
class | DebugEnabler
| A holder for a debug level. More...
class | Debugger
| An object that logs messages on creation and destruction. More...
class | DefaultLogic
| The client's default logic. More...
class | DnsRecord
| A DNS record. More...
class | Driver
| A Channel driver module. More...
class | DurationUpdate
| An UI time updater. More...
class | Engine
| Engine globals. More...
class | EngineCheck
| Engine checker interface. More...
class | File
| A stream file class. More...
class | Flags32
| A 32 bit length list of flags. More...
struct | FormatInfo
class | FormatRepository
| A repository for media formats. More...
class | GenObject
class | GenPointer
| Templated pointer that can be inserted in a list. More...
class | Hasher
| An abstract hashing class. More...
class | HashList
| A hashed object list class. More...
struct | ImageInfo
class | ListIterator
| Class used to iterate the items of a list. More...
class | Lock
| Ephemeral mutex or semaphore locking object. More...
class | Lock2
| Ephemeral double mutex locking object. More...
class | Lockable
| Abstract interface for lockable objects. More...
class | Math
| Math utilities. More...
class | MathVectorBase
| Base class for vector class(es) More...
class | MD5
| A standard MD5 digest calculator. More...
class | MemoryStream
| A Stream that operates on DataBlocks in memory. More...
class | Message
| A message container class. More...
class | MessageDispatcher
| A message dispatching hub. More...
class | MessageHandler
| A message handler. More...
class | MessageHook
| Abstract message hook. More...
class | MessageNotifier
| Post-dispatching message hook. More...
class | MessagePostHook
| Post-dispatching message hook that can be added to a list. More...
class | MessageQueue
| A message queue. More...
class | MessageReceiver
| A multiple message receiver. More...
class | MessageRelay
| A message handler relay. More...
class | MimeAuthLine
| MIME authentication line. More...
class | MimeBinaryBody
| MIME for obscure binary data. More...
class | MimeBody
| Abstract MIME data holder. More...
class | MimeHeaderLine
| MIME header line. More...
class | MimeLinesBody
| MIME for multiple text lines. More...
class | MimeMultipartBody
| MIME multipart container. More...
class | MimeSdpBody
| MIME for application/sdp. More...
class | MimeStringBody
| MIME for one text string. More...
class | Module
| A Plugin that implements a module. More...
class | MucRoom
| An account's MUC room contact. More...
class | MucRoomMember
| A MUC room member. More...
class | Mutex
| Mutex support. More...
class | MutexPool
| A Mutex pool. More...
class | NamedCounter
| Atomic counter with name. More...
class | NamedInt
| A named integer value. More...
class | NamedIterator
| NamedList parameters iterator. More...
class | NamedList
| A named string container class. More...
class | NamedPointer
| A named pointer class. More...
class | NamedString
| A named string class. More...
class | NaptrRecord
| A NAPTR record. More...
class | ObjList
| An object list class. More...
class | ObjVector
| A vector holding GenObjects. More...
class | Plugin
| Plugin support. More...
class | Random
| Pseudo random number generator. More...
class | RefObject
class | RefPointer
| Templated smart pointer class. More...
class | RefPointerBase
| Internal helper class. More...
class | RefStorage
| A fixed ref counted storage. More...
class | Regexp
| A regexp matching class. More...
class | Resolver
| DNS services. More...
class | Router
| Call routing thread. More...
class | Runnable
| Encapsulates a runnable task. More...
class | SctpSocket
| Abstract SCTP Socket. More...
class | Semaphore
| Semaphore implementation. More...
class | SHA1
| A standard SHA1 digest calculator. More...
class | SHA256
| A standard SHA256 digest calculator. More...
class | SharedVars
| Atomic access and operations to shared variables. More...
class | SliceVector
| A slice vector. More...
class | Socket
| A generic socket class. More...
class | SocketAddr
| A socket address holder. More...
class | SocketFilter
| A filter for received socket data. More...
class | SocketRef
| RefObject holding a Socket pointer. More...
class | SrvRecord
| A SRV record. More...
class | Stream
| An abstract stream class capable of reading and writing. More...
class | String
| A C-style string handling class. More...
class | SysUsage
| A class exposing system resources usage. More...
class | TempObjectCounter
| Ephemeral object counter changer. More...
class | Thread
| Thread support class. More...
class | ThreadedSource
| Data source with own thread. More...
class | Time
| A time holding class. More...
struct | TokenDict
struct | TokenDict64
struct | TranslatorCaps
class | TranslatorFactory
| An unidirectional data translator (codec) More...
class | TxtRecord
| A text based DNS record. More...
class | UChar
| A single Unicode character. More...
class | UIFactory
| A static user interface creator. More...
class | UIWidget
class | URI
| Encapsulation for an URI. More...
class | Window
| An abstract user interface window. More...
class | XmlCData
| Xml Declaration. More...
class | XmlChild
| Xml Child. More...
class | XmlComment
| Xml Comment. More...
class | XmlDeclaration
| Xml Declaration. More...
class | XmlDoctype
class | XmlDocument
| Xml Document. More...
class | XmlDomParser
| Document Object Model XML Parser. More...
class | XmlElement
| Xml Element. More...
struct | XmlEscape
class | XmlFragment
| Xml Fragment. More...
class | XmlParent
| Xml Parent. More...
class | XmlSaxParser
| Serial Access XML Parser. More...
class | XmlText
| Xml Declaration. More...

## Typedefs
typedef int(* | EngineLoop )()
typedef SliceVector< Complex > | ComplexVector
typedef SliceVector< float > | FloatVector
typedef SliceVector< uint8_t > | ByteVector

## Enumerations
enum | DebugLevel { DebugFail = 0, DebugTest = 1, DebugCrit = 2, DebugGoOn = DebugCrit, DebugConf = 3, DebugStub = 4, DebugWarn = 5, DebugMild = 6, DebugNote = 7, DebugCall = 8, DebugInfo = 9, DebugAll = 10 }

## Functions
void | abortOnBug ()
bool | abortOnBug (bool doAbort)
int | debugLevel ()
int | debugLevel (int level)
bool | debugAt (int level)
const char * | debugColor (int level)
const char * | debugLevelName (int level)
void | DDebug (int level, const char *format,...)
void | DDebug (const char *facility, int level, const char *format,...)
void | DDebug (const DebugEnabler *local, int level, const char *format,...)
void | XDebug (int level, const char *format,...)
void | XDebug (const char *facility, int level, const char *format,...)
void | XDebug (const DebugEnabler *local, int level, const char *format,...)
void | NDebug (int level, const char *format,...)
void | NDebug (const char *facility, int level, const char *format,...)
void | NDebug (const DebugEnabler *local, int level, const char *format,...)
void | Debug (int level, const char *format,...)
void | Debug (const char *facility, int level, const char *format,...)
void | Debug (const DebugEnabler *local, int level, const char *format,...)
void | Alarm (const char *component, int level, const char *format,...)
void | Alarm (const DebugEnabler *component, int level, const char *format,...)
void | Alarm (const char *component, const char *info, int level, const char *format,...)
void | Alarm (const DebugEnabler *component, const char *info, int level, const char *format,...)
void | Output (const char *format,...)
void | TraceDebug (const char *traceId, int level, const char *format,...)
void | TraceDebug (const char *traceId, const char *facility, int level, const char *format,...)
void | TraceDebug (const char *traceId, const DebugEnabler *local, int level, const char *format,...)
void | TraceDebugObj (GenObject *obj, int level, const char *format,...)
void | TraceDebugObj (GenObject *obj, const char *facility, int level, const char *format,...)
void | TraceDebugObj (GenObject *obj, const DebugEnabler *local, int level, const char *format,...)
void | Trace (GenObject *obj, int level, const char *format,...)
void | Trace (GenObject *obj, const char *facility, int level, const char *format,...)
void | Trace (GenObject *obj, const DebugEnabler *local, int level, const char *format,...)
void | TraceObj (GenObject *obj, int level, const char *format,...)
void | TraceObj (GenObject *obj, const char *facility, int level, const char *format,...)
void | TraceObj (GenObject *obj, const DebugEnabler *local, int level, const char *format,...)
void | TraceAlarm (const char *traceId, const char *component, int level, const char *format,...)
void | TraceAlarm (const char *traceId, const DebugEnabler *component, int level, const char *format,...)
void | TraceAlarm (const char *traceId, const char *component, const char *info, int level, const char *format,...)
void | TraceAlarm (const char *traceId, const DebugEnabler *component, const char *info, int level, const char *format,...)
void | YIGNORE (primitive value)
constant | YSTRING (const char *string)
constant | YATOM (const char *string)
void | YCLASS (class type, class base)
void | YCLASS2 (class type, class base1, class base2)
void | YCLASS3 (class type, class base1, class base2, class base3)
void | YCLASSIMP (class type, class base)
void | YCLASSIMP2 (class type, class base1, class base2)
void | YCLASSIMP3 (class type, class base1, class base2, class base3)
class * | YOBJECT (class type, GenObject *pntr)
void | YNOCOPY (class type)
uint32_t | hashInt64 (uint64_t val)
uint32_t | hashInt32 (uint32_t val)
uint32_t | hashPtr (const void *ptr)
void | destruct (GenObject *obj)
template<class Obj >
void | destruct (Obj *&obj)
const char * | c_str (const String *str)
const char * | c_safe (const char *str)
const char * | c_safe (const String *str)
bool | null (const char *str)
bool | null (const String *str)
String | operator+ (const String &s1, const String &s2)
String | operator+ (const String &s1, const char *s2)
String | operator+ (const char *s1, const String &s2)
const char * | strcpy (String &dest, const char *src)
const char * | strcat (String &dest, const char *src)
int | lookup (const char *str, const TokenDict *tokens, int defvalue=0, int base=0)
const char * | lookup (int value, const TokenDict *tokens, const char *defvalue=0)
int64_t | lookup (const char *str, const TokenDict64 *tokens, int64_t defvalue=0, int base=0)
const char * | lookup (int64_t value, const TokenDict64 *tokens, const char *defvalue=0)
bool | controlReturn (NamedList *params, bool ret, const char *retVal=0)
void | INIT_PLUGIN (class pclass)
bool | UNLOAD_PLUGIN (bool unloadNow)
bool | isE164 (const char *str)
Complex | operator+ (const Complex &c1, const Complex &c2)
Complex | operator+ (const Complex &c, float f)
Complex | operator+ (float f, const Complex &c)
Complex | operator- (const Complex &c1, const Complex &c2)
Complex | operator- (const Complex &c, float f)
Complex | operator* (const Complex &c1, const Complex &c2)
Complex | operator* (const Complex &c, float f)
Complex | operator* (float f, const Complex &c)
Complex | operator/ (const Complex &c1, const Complex &c2)
Complex | operator/ (const Complex &c, float f)
String & | operator<< (String &str, const Complex &c)
String & | operator<< (String &str, const BitVector &b)

## Detailed Description

Holds all Telephony Engine related classes.

## Typedef Documentation

typedef int(* EngineLoop)()

Prototype for engine main loop callback

## Enumeration Type Documentation

enum DebugLevel

Standard debugging levels. The DebugFail level is special - it is always displayed and may abort the program if abortOnBug() is set.

## Function Documentation

void TelEngine::abortOnBug | ( |  | ) |

Abort execution (and coredump if allowed) if the abort flag is set. This function may not return.

bool TelEngine::abortOnBug | ( | bool | doAbort | ) |

Set the abort on bug flag. The default flag state is false.

Returns
  The old state of the flag.

void TelEngine::Alarm | ( | const char * | component,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string and emits an alarm if a callback is installed

Parameters

  component | Component that emits the alarm
  level | The level of the alarm
  format | A printf() style format string

void TelEngine::Alarm | ( | const DebugEnabler * | component,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string and emits an alarm if a callback is installed

Parameters

  component | Pointer to a DebugEnabler holding component name and debugging settings
  level | The level of the alarm
  format | A printf() style format string

void TelEngine::Alarm | ( | const char * | component,
|  | const char * | info,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string and emits an alarm if a callback is installed

Parameters

  component | Component that emits the alarm
  info | Extra alarm information
  level | The level of the alarm
  format | A printf() style format string

void TelEngine::Alarm | ( | const DebugEnabler * | component,
|  | const char * | info,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string and emits an alarm if a callback is installed

Parameters

  component | Pointer to a DebugEnabler holding component name and debugging settings
  info | Extra alarm information
  level | The level of the alarm
  format | A printf() style format string

const char* TelEngine::c_safe | ( | const char * | str | ) |
| inline

Utility function to replace NULL C string pointers with an empty C string

Parameters

  str | Pointer to a C string that may be NULL

Returns
  Original pointer or pointer to an empty C string

const char* TelEngine::c_safe | ( | const String * | str | ) |
| inline

Utility function to replace NULL String pointers with an empty C string

Parameters

  str | Pointer to a String that may be NULL

Returns
  String data pointer or pointer to an empty C string

References String::safe().

const char* TelEngine::c_str | ( | const String * | str | ) |
| inline

Utility function to retrieve a C string from a possibly NULL String pointer

Parameters

  str | Pointer to a String that may be NULL

Returns
  String data pointer or NULL

References String::c_str().

bool TelEngine::controlReturn | ( | NamedList * | params,
|  | bool | ret,
|  | const char * | retVal = `0`
| ) |  |

Utility method to return from a chan.control handler

Parameters

  params | The parameters list
  ret | The return value
  retVal | The error message

Returns
  ret if the message was not generated from rmanager.

void TelEngine::DDebug | ( | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if DEBUG is #defined (compiling for debugging) else it does not get compiled at all.

void TelEngine::DDebug | ( | const char * | facility,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if DEBUG is #defined (compiling for debugging) else it does not get compiled at all.

void TelEngine::DDebug | ( | const DebugEnabler * | local,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if DEBUG is #defined (compiling for debugging) else it does not get compiled at all.

void TelEngine::Debug | ( | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string.

Parameters

  level | The level of the message
  format | A printf() style format string

void TelEngine::Debug | ( | const char * | facility,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string for a specific facility.

Parameters

  facility | Facility that outputs the message
  level | The level of the message
  format | A printf() style format string

void TelEngine::Debug | ( | const DebugEnabler * | local,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string for a specific facility.

Parameters

  local | Pointer to a DebugEnabler holding current debugging settings
  level | The level of the message
  format | A printf() style format string

bool TelEngine::debugAt | ( | int | level | ) |

Check if debugging output should be generated

Parameters

  level | The global debug level we are testing

Returns
  True if messages should be output, false otherwise

const char* TelEngine::debugColor | ( | int | level | ) |

Get an ANSI string to colorize debugging output

Parameters

  level | The debug level who's color is requested. Negative or out of range will reset to the default color

Returns
  ANSI string that sets color corresponding to level

int TelEngine::debugLevel | ( |  | ) |

Retrieve the current global debug level

Returns
  The current global debug level

int TelEngine::debugLevel | ( | int | level | ) |

Set the current global debug level.

Parameters

  level | The desired debug level

Returns
  The new global debug level (may be different)

const char* TelEngine::debugLevelName | ( | int | level | ) |

Get the name of a debugging or alarm level

Parameters

  level | The debug level

Returns
  Short C string describing the level

void TelEngine::destruct | ( | GenObject * | obj | ) |
| inline

Helper function that destroys a GenObject only if the pointer is non-NULL. Use it instead of the delete operator.

Parameters

  obj | Pointer (rvalue) to the object to destroy

References GenObject::destruct().

Referenced by XmlParent::addChildSafe(), and ClientChannel::setClientData().

void TelEngine::destruct | ( | Obj *& | obj | ) |

Helper template function that destroys a GenObject descendant if the pointer is non-NULL and also zeros out the pointer. Use it instead of the delete operator.

Parameters

  obj | Reference to pointer (lvalue) to the object to destroy

uint32_t TelEngine::hashInt32 | ( | uint32_t | val | ) |
| inline

Compute a hash for a 32-bit unsigned integer

Parameters

  val | Integer value to hash

Returns
  Hash value

Referenced by hashPtr().

uint32_t TelEngine::hashInt64 | ( | uint64_t | val | ) |
| inline

Compute a hash for a 64-bit unsigned integer

Parameters

  val | Integer value to hash

Returns
  Hash value

Referenced by hashPtr().

uint32_t TelEngine::hashPtr | ( | const void * | ptr | ) |
| inline

Compute a hash for a pointer

Parameters

  val | Pointer to hash

Returns
  Hash value

References hashInt32(), and hashInt64().

void TelEngine::INIT_PLUGIN | ( | class pclass |  | ) |

Macro to create static instance of the plugin

Parameters

  pclass | Class of the plugin to create

bool TelEngine::isE164 | ( | const char * | str | ) |

Find if a string appears to be an E164 phone number

Parameters

  str | String to check

Returns
  True if str appears to be a valid E164 number

int TelEngine::lookup | ( | const char * | str,
|  | const TokenDict * | tokens,
|  | int | defvalue = `0`,
|  | int | base = `0`
| ) |  |

Utility function to look up a string in a token table, interpret as number if it fails

Parameters

  str | String to look up
  tokens | Pointer to the token table
  defvalue | Value to return if lookup and conversion fail
  base | Default base to use to convert to number

Referenced by Cipher::direction(), XmlSaxParser::getError(), ClientChannel::lookup(), SocketAddr::lookupFamily(), ClientChannel::lookupSlaveType(), Module::relayId(), Socket::setTOS(), ClientResource::statusDisplayText(), and ClientResource::statusName().

const char* TelEngine::lookup | ( | int | value,
|  | const TokenDict * | tokens,
|  | const char * | defvalue = `0`
| ) |  |

Utility function to look up a number in a token table

Parameters

  value | Value to search for
  tokens | Pointer to the token table
  defvalue | Value to return if lookup fails

int64_t TelEngine::lookup | ( | const char * | str,
|  | const TokenDict64 * | tokens,
|  | int64_t | defvalue = `0`,
|  | int | base = `0`
| ) |  |

Utility function to look up a string in a 64bit token table, interpret as number if it fails

Parameters

  str | String to look up
  tokens | Pointer to the token table
  defvalue | Value to return if lookup and conversion fail
  base | Default base to use to convert to number

const char* TelEngine::lookup | ( | int64_t | value,
|  | const TokenDict64 * | tokens,
|  | const char * | defvalue = `0`
| ) |  |

Utility function to look up a 64bit number in a token table

Parameters

  value | Value to search for
  tokens | Pointer to the token table
  defvalue | Value to return if lookup fails

void TelEngine::NDebug | ( | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if NDEBUG is not #defined else it does not get compiled at all (compiling for mature release).

void TelEngine::NDebug | ( | const char * | facility,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if NDEBUG is not #defined else it does not get compiled at all (compiling for mature release).

void TelEngine::NDebug | ( | const DebugEnabler * | local,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if NDEBUG is not #defined else it does not get compiled at all (compiling for mature release).

bool TelEngine::null | ( | const char * | str | ) |
| inline

Utility function to check if a C string is null or empty

Parameters

  str | Pointer to a C string

Returns
  True if str is NULL or starts with a NUL character

Referenced by SliceVector< Obj >::dump(), and XmlElement::setAttributeValid().

bool TelEngine::null | ( | const String * | str | ) |
| inline

Utility function to check if a String is null or empty

Parameters

  str | Pointer to a String

Returns
  True if str is NULL or is empty

References String::null().

Complex TelEngine::operator* | ( | const Complex & | c1,
|  | const Complex & | c2
| ) |  |
| inline

Multiplication operator

Parameters

  c1 | First number
  c2 | Second number

Returns
  The result

Referenced by operator*().

Complex TelEngine::operator* | ( | const Complex & | c,
|  | float | f
| ) |  |
| inline

Multiplication operator

Parameters

  c | A Complex number
  f | A float value

Returns
  The result

Complex TelEngine::operator* | ( | float | f,
|  | const Complex & | c
| ) |  |
| inline

Multiplication operator

Parameters

  f | A float value
  c | A Complex number

Returns
  The result

References operator*().

Complex TelEngine::operator+ | ( | const Complex & | c1,
|  | const Complex & | c2
| ) |  |
| inline

Addition operator

Parameters

  c1 | First number
  c2 | Second number

Returns
  The result

Complex TelEngine::operator+ | ( | const Complex & | c,
|  | float | f
| ) |  |
| inline

Addition operator

Parameters

  c | A Complex number
  f | A float value

Returns
  The result

Complex TelEngine::operator+ | ( | float | f,
|  | const Complex & | c
| ) |  |
| inline

Addition operator

Parameters

  f | The float value
  c | The Complex number

Returns
  The result

References operator+().

String TelEngine::operator+ | ( | const String & | s1,
|  | const String & | s2
| ) |  |

Concatenation operator for strings.

Referenced by operator+().

String TelEngine::operator+ | ( | const String & | s1,
|  | const char * | s2
| ) |  |

Concatenation operator for strings.

String TelEngine::operator+ | ( | const char * | s1,
|  | const String & | s2
| ) |  |

Concatenation operator for strings.

Complex TelEngine::operator- | ( | const Complex & | c1,
|  | const Complex & | c2
| ) |  |
| inline

Substraction operator

Parameters

  c1 | First number
  c2 | Second number

Returns
  The result

Complex TelEngine::operator- | ( | const Complex & | c,
|  | float | f
| ) |  |
| inline

Substraction operator

Parameters

  c | A Complex number
  f | A float value

Returns
  The result

Complex TelEngine::operator/ | ( | const Complex & | c1,
|  | const Complex & | c2
| ) |  |
| inline

Division operator

Parameters

  c1 | First number
  c2 | Second number

Returns
  The result

Complex TelEngine::operator/ | ( | const Complex & | c,
|  | float | f
| ) |  |
| inline

Division operator

Parameters

  c | A Complex number
  f | A float value

Returns
  The result

String& TelEngine::operator<< | ( | String & | str,
|  | const Complex & | c
| ) |  |
| inline

Append operator: append a Complex number to a String

Parameters

  str | Destination string
  c | Complex number to append

Returns
  Destination string reference

References Math::dumpComplex().

String& TelEngine::operator<< | ( | String & | str,
|  | const BitVector & | b
| ) |  |
| inline

Append operator: append a BitVector to a String

Parameters

  str | Destination string
  b | Vector to append

Returns
  Destination string reference

References BitVector::appendTo().

void TelEngine::Output | ( | const char * | format,
|  |  | ...
| ) |  |

Outputs a string to the debug console with formatting

Parameters

  format | A printf() style format string

const char* TelEngine::strcat | ( | String & | dest,
|  | const char * | src
| ) |  |
| inline

Prevent careless programmers from overwriting the string

See also
  TelEngine::String::operator+=

References String::c_str().

const char* TelEngine::strcpy | ( | String & | dest,
|  | const char * | src
| ) |  |
| inline

Prevent careless programmers from overwriting the string

See also
  TelEngine::String::operator=

References String::c_str().

void TelEngine::Trace | ( | GenObject * | obj,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string only if trace ID is valid.

Parameters

  obj | Object from where to get trace ID
  level | The level of the message
  format | A printf() style format string

void TelEngine::Trace | ( | GenObject * | obj,
|  | const char * | facility,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string only if trace ID is valid.

Parameters

  obj | Object from where to get trace ID
  facility | Facility that outputs the message
  level | The level of the message
  format | A printf() style format string

void TelEngine::Trace | ( | GenObject * | obj,
|  | const DebugEnabler * | local,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string only if trace ID is valid.

Parameters

  obj | Object from where to get trace ID
  local | Pointer to a DebugEnabler holding current debugging settings
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceAlarm | ( | const char * | traceId,
|  | const char * | component,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with trace ID and emits an alarm if a callback is installed

Parameters

  traceId | The trace ID associated with this message
  component | Component that emits the alarm
  info | Extra alarm information
  level | The level of the alarm
  format | A printf() style format string

void TelEngine::TraceAlarm | ( | const char * | traceId,
|  | const DebugEnabler * | component,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with trace ID and emits an alarm if a callback is installed

Parameters

  traceId | The trace ID associated with this message
  component | Pointer to a DebugEnabler holding component name and debugging settings
  level | The level of the alarm
  format | A printf() style format string

void TelEngine::TraceAlarm | ( | const char * | traceId,
|  | const char * | component,
|  | const char * | info,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with trace ID and emits an alarm if a callback is installed

Parameters

  traceId | The trace ID associated with this message
  component | Component that emits the alarm
  info | Extra alarm information
  level | The level of the alarm
  format | A printf() style format string

void TelEngine::TraceAlarm | ( | const char * | traceId,
|  | const DebugEnabler * | component,
|  | const char * | info,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with trace ID and emits an alarm if a callback is installed

Parameters

  traceId | The trace ID associated with this message
  component | Pointer to a DebugEnabler holding component name and debugging settings
  info | Extra alarm information
  level | The level of the alarm
  format | A printf() style format string

void TelEngine::TraceDebug | ( | const char * | traceId,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with a trace ID.

Parameters

  traceId | The trace ID associated with this message
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceDebug | ( | const char * | traceId,
|  | const char * | facility,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with a trace ID.

Parameters

  traceId | The trace ID associated with this message
  facility | Facility that outputs the message
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceDebug | ( | const char * | traceId,
|  | const DebugEnabler * | local,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with a trace ID.

Parameters

  traceId | The trace ID associated with this message
  local | Pointer to a DebugEnabler holding current debugging settings
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceDebugObj | ( | GenObject * | obj,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with a trace ID.

Parameters

  obj | Object from where to get trace ID
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceDebugObj | ( | GenObject * | obj,
|  | const char * | facility,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with a trace ID.

Parameters

  obj | Object from where to get trace ID
  facility | Facility that outputs the message
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceDebugObj | ( | GenObject * | obj,
|  | const DebugEnabler * | local,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string with a trace ID.

Parameters

  obj | Object from where to get trace ID
  local | Pointer to a DebugEnabler holding current debugging settings
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceObj | ( | GenObject * | obj,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string only if trace ID is valid.

Parameters

  obj | Object from where to get trace ID
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceObj | ( | GenObject * | obj,
|  | const char * | facility,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string only if trace ID is valid.

Parameters

  obj | Object from where to get trace ID
  facility | Facility that outputs the message
  level | The level of the message
  format | A printf() style format string

void TelEngine::TraceObj | ( | GenObject * | obj,
|  | const DebugEnabler * | local,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Outputs a debug string only if trace ID is valid.

Parameters

  obj | Object from where to get trace ID
  local | Pointer to a DebugEnabler holding current debugging settings
  level | The level of the message
  format | A printf() style format string

bool TelEngine::UNLOAD_PLUGIN | ( | bool | unloadNow | ) |

Macro to create the unloading function

Parameters

  unloadNow | True if asked to unload immediately, false if just checking

Returns
  True if the plugin can be unloaded, false if not

void TelEngine::XDebug | ( | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if XDEBUG is #defined (compiling for extra debugging) else it does not get compiled at all.

void TelEngine::XDebug | ( | const char * | facility,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if XDEBUG is #defined (compiling for extra debugging) else it does not get compiled at all.

void TelEngine::XDebug | ( | const DebugEnabler * | local,
|  | int | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Convenience macro. Does the same as Debug if XDEBUG is #defined (compiling for extra debugging) else it does not get compiled at all.

constant TelEngine::YATOM | ( | const char * | string | ) |

Macro to create a shared static String if supported by compiler, use with caution

Parameters

  string | Literal constant string

Returns
  A const String& if supported, literal string if not supported

Referenced by SocketRef::getObject().

void TelEngine::YCLASS | ( | class type | ,
|  | class base |
| ) |  |

Macro to create a GenObject class from a base class and implement GenObject::getObject

Parameters

  type | Class that is declared
  base | Base class that is inherited

void TelEngine::YCLASS2 | ( | class type | ,
|  | class base1 | ,
|  | class base2 |
| ) |  |

Macro to create a GenObject class from two base classes and implement GenObject::getObject

Parameters

  type | Class that is declared
  base1 | First base class that is inherited
  base2 | Second base class that is inherited

void TelEngine::YCLASS3 | ( | class type | ,
|  | class base1 | ,
|  | class base2 | ,
|  | class base3 |
| ) |  |

Macro to create a GenObject class from three base classes and implement GenObject::getObject

Parameters

  type | Class that is declared
  base1 | First base class that is inherited
  base2 | Second base class that is inherited
  base3 | Third base class that is inherited

void TelEngine::YCLASSIMP | ( | class type | ,
|  | class base |
| ) |  |

Macro to implement GenObject::getObject in a derived class

Parameters

  type | Class that is declared
  base | Base class that is inherited

void TelEngine::YCLASSIMP2 | ( | class type | ,
|  | class base1 | ,
|  | class base2 |
| ) |  |

Macro to implement GenObject::getObject in a derived class

Parameters

  type | Class that is declared
  base1 | First base class that is inherited
  base2 | Second base class that is inherited

void TelEngine::YCLASSIMP3 | ( | class type | ,
|  | class base1 | ,
|  | class base2 | ,
|  | class base3 |
| ) |  |

Macro to implement GenObject::getObject in a derived class

Parameters

  type | Class that is declared
  base1 | First base class that is inherited
  base2 | Second base class that is inherited
  base3 | Third base class that is inherited

void TelEngine::YIGNORE | ( | primitive | value | ) |

Macro to ignore the result of a function

Parameters

  value | Returned value to be ignored, must be interpretable as boolean

void TelEngine::YNOCOPY | ( | class type |  | ) |

Macro to disable automatic copy and assignment operators

Parameters

  type | Class that is declared

class* TelEngine::YOBJECT | ( | class type | ,
|  | GenObject * | pntr
| ) |  |

Macro to retrieve a typed pointer to an interface from an object

Parameters

  type | Class we want to return
  pntr | Pointer to the object we want to get the interface from

Returns
  Pointer to the class we want or NULL

constant TelEngine::YSTRING | ( | const char * | string | ) |

Macro to create a local static String if supported by compiler, use with caution

Parameters

  string | Literal constant string

Returns
  A const String& if supported, literal string if not supported

Referenced by ClientLogic::cdrRemoteParty(), ClientAccount::dataDir(), ClientAccount::hasChat(), ClientAccount::hasPresence(), ClientContact::local(), ClientAccount::protocol(), ClientContact::remote(), Channel::setChanParams(), and ClientAccount::startup().