Fixed buffer overflow bug at pickup feature
[lcr.git] / vbox.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** Linux Call Router                                                         **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** port header file                                                          **
9 **                                                                           **
10 \*****************************************************************************/ 
11
12 /* answerin machine port class */
13 class VBoxPort : public Port
14 {
15         public:
16         VBoxPort(int type, struct port_settings *settings);
17         ~VBoxPort();
18         int message_epoint(unsigned int epoint_id, int message, union parameter *param);
19         void send_announcement(void);
20
21         private:
22         struct EndpointAppPBX *p_vbox_apppbx;           /* pbx application */
23         unsigned int p_vbox_timeout;                    /* timeout for recording */
24         char p_vbox_extension[32];                      /* current extension */
25
26 //      int p_vbox_recording;                           /* if currently recording */
27         int p_vbox_announce_fh;                         /* the announcement filehandler */
28         int p_vbox_announce_codec;                      /* the announcement codec */
29         signed int p_vbox_announce_left;                /* the number of bytes left of announcement sample */
30         signed int p_vbox_announce_size;                /* size of current announcement (in bytes) */
31         int p_vbox_mode;                                /* type of recording VBOX_MODE_* */
32         long long p_vbox_audio_start;                   /* time stamp of starting of audio (0 == not yet started) */ 
33         unsigned int p_vbox_audio_transferred;          /* number of samples sent to endpoint */
34         struct lcr_timer p_vbox_announce_timer;         /* timer for sending announcement */
35         struct lcr_timer p_vbox_record_timeout;         /* timer for recording limit */
36         signed int p_vbox_record_limit;         /* limit for recording */
37
38         struct extension p_vbox_ext;                    /* save settings of extension */
39 };
40