#include <AmCtrlInterface.h>
Inheritance diagram for AmCtrlInterface:

Public Member Functions | |
| virtual int | init (const string &addr)=0 |
| virtual int | sendto (const string &addr, const char *buf, unsigned int len)=0 |
| int | wait4data (int timeout) |
| int | getFd () const |
| virtual int | cacheMsg ()=0 |
| int | getLine (string &line) |
| int | getLines (string &lines) |
| int | getParam (string ¶m) |
| virtual void | consume () |
| virtual void | close () |
Static Public Member Functions | |
| static AmCtrlInterface * | getNewCtrl () |
Protected Member Functions | |
| virtual int | get_line (char *lb, unsigned int lbs)=0 |
| virtual int | get_lines (char *lb, unsigned int lbs)=0 |
| virtual int | get_param (string &p, char *lb, unsigned int lbs)=0 |
| AmCtrlInterface (int fd) | |
Protected Attributes | |
| int | fd |
| bool | close_fd |
| char | buffer [CTRL_MSGBUF_SIZE] |
The AmCtrlInterface defines the interface for SER-SEMS communication interface (unix socket/fifo).
The FIFO / Unix socket Server.
Enables Ser to send request throught FIFO file.
Syntax for FIFO commands:
version EOL // 'x.x'
command EOL // fct_name.{plugin_name,'bye'}
method EOL
user EOL
dstip EOL // important for the RTP connection IP
from EOL
to EOL
call-id EOL
from-tag EOL
[to-tag] EOL
cseq EOL
transid EOL // Ser's tranction ID
[body] EOL
.EOL
EOL
| virtual int AmCtrlInterface::cacheMsg | ( | ) | [pure virtual] |
| virtual int AmCtrlInterface::get_line | ( | char * | lb, | |
| unsigned int | lbs | |||
| ) | [protected, pure virtual] |
| virtual int AmCtrlInterface::init | ( | const string & | addr | ) | [pure virtual] |
Open a server control interface. This must be called before everything else
| addr | local address for server behavior |
Implemented in AmFifoCtrlInterface, and AmUnixCtrlInterface.
| virtual int AmCtrlInterface::sendto | ( | const string & | addr, | |
| const char * | buf, | |||
| unsigned int | len | |||
| ) | [pure virtual] |
Send a message.
| addr | destination address. |
Implemented in AmFifoCtrlInterface, and AmUnixCtrlInterface.
| int AmCtrlInterface::wait4data | ( | int | timeout | ) |
Return: -1 if error. 0 if timeout. 1 if there some datas ready.
1.4.7