X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=vbox.h;h=69cf83c2cff7db83671bc724f8e211627e42a978;hp=3a7dc3a639fe1d58e9d8b52ee1733d60a9c69308;hb=9464c059e6059a4215f772882da1cdf72a183ce5;hpb=e9daaa4ef7ee895e6a8610ebb2166cc99c891a4e diff --git a/vbox.h b/vbox.h index 3a7dc3a..69cf83c 100644 --- a/vbox.h +++ b/vbox.h @@ -1,38 +1,41 @@ /*****************************************************************************\ ** ** -** PBX4Linux ** +** Linux Call Router ** ** ** **---------------------------------------------------------------------------** ** Copyright: Andreas Eversberg ** ** ** -** port header file ** +** vbox-port header file ** ** ** \*****************************************************************************/ -/* answerin machine port class */ +/* answering machine port class */ class VBoxPort : public Port { public: VBoxPort(int type, struct port_settings *settings); ~VBoxPort(); - int message_epoint(unsigned long epoint_id, int message, union parameter *param); - int handler(void); + int message_epoint(unsigned int epoint_id, int message, union parameter *param); + void send_announcement(void); + + int bridge_rx(unsigned char *data, int len); private: struct EndpointAppPBX *p_vbox_apppbx; /* pbx application */ - unsigned long p_vbox_timeout; /* timeout for recording */ + unsigned int p_vbox_timeout; /* timeout for recording */ char p_vbox_extension[32]; /* current extension */ // int p_vbox_recording; /* if currently recording */ int p_vbox_announce_fh; /* the announcement filehandler */ int p_vbox_announce_codec; /* the announcement codec */ - signed long p_vbox_announce_left; /* the number of bytes left of announcement sample */ - signed long p_vbox_announce_size; /* size of current announcement (in bytes) */ + signed int p_vbox_announce_left; /* the number of bytes left of announcement sample */ + signed int p_vbox_announce_size; /* size of current announcement (in bytes) */ int p_vbox_mode; /* type of recording VBOX_MODE_* */ - double p_vbox_audio_start; /* time stamp of starting of audio (<1 == not yet started) */ - unsigned long p_vbox_audio_transferred; /* number of samples sent to endpoint */ - signed long p_vbox_record_start; /* start for recording */ - signed long p_vbox_record_limit; /* limit for recording */ + long long p_vbox_audio_start; /* time stamp of starting of audio (0 == not yet started) */ + unsigned int p_vbox_audio_transferred; /* number of samples sent to endpoint */ + struct lcr_timer p_vbox_announce_timer; /* timer for sending announcement */ + struct lcr_timer p_vbox_record_timeout; /* timer for recording limit */ + signed int p_vbox_record_limit; /* limit for recording */ struct extension p_vbox_ext; /* save settings of extension */ };