only for backup, still in coding state - no compile!!!
[lcr.git] / dss1.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** PBX4Linux                                                                 **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** dss1-port header file                                                     **
9 **                                                                           **
10 \*****************************************************************************/ 
11
12 /* DSS1 port classes */
13 class Pdss1 : public PmISDN
14 {
15         public:
16         Pdss1(int type, struct mISDNport *mISDNport, char *portname, struct port_settings *settings, int channel);
17         ~Pdss1();
18         int p_m_d_l3id;                         /* current l3 process id */
19         int p_m_d_ces;                          /* ntmode: tei&sapi */
20         int handler(void);
21         int message_epoint(unsigned long epoint_id, int message, union parameter *param);
22         void message_isdn(unsigned long prim, unsigned long dinfo, void *data);
23
24         int p_m_d_ntmode;                       /* flags the nt-mode */
25         struct message *p_m_d_queue;            /* queue for SETUP if link is down */
26         struct message *p_m_d_notify_pending;   /* queue for NOTIFY if not connected */
27
28         int p_m_d_collect_cause;                /* collecting cause and location */
29         int p_m_d_collect_location;
30
31         void new_state(int state);              /* set new state */
32         void isdn_show_send_message(unsigned long prim, msg_t *msg);
33         int received_first_reply_to_setup(unsigned long prim, int exclusive, int channel);
34         void information_ind(unsigned long prim, unsigned long dinfo, void *data);
35         void setup_ind(unsigned long prim, unsigned long dinfo, void *data);
36         void setup_acknowledge_ind(unsigned long prim, unsigned long dinfo, void *data);
37         void proceeding_ind(unsigned long prim, unsigned long dinfo, void *data);
38         void alerting_ind(unsigned long prim, unsigned long dinfo, void *data);
39         void connect_ind(unsigned long prim, unsigned long dinfo, void *data);
40         void disconnect_ind(unsigned long prim, unsigned long dinfo, void *data);
41         void release_ind(unsigned long prim, unsigned long dinfo, void *data);
42         void release_complete_ind(unsigned long prim, unsigned long dinfo, void *data);
43         void disconnect_ind_i(unsigned long prim, unsigned long dinfo, void *data);
44         void t312_timeout(unsigned long prim, unsigned long dinfo, void *data);
45         void notify_ind(unsigned long prim, unsigned long dinfo, void *data);
46         void facility_ind(unsigned long prim, unsigned long dinfo, void *data);
47         void hold_ind(unsigned long prim, unsigned long dinfo, void *data);
48         void retrieve_ind(unsigned long prim, unsigned long dinfo, void *data);
49         void suspend_ind(unsigned long prim, unsigned long dinfo, void *data);
50         void resume_ind(unsigned long prim, unsigned long dinfo, void *data);
51         void message_information(unsigned long epoint_id, int message_id, union parameter *param);
52         void message_setup(unsigned long epoint_id, int message_id, union parameter *param);
53         void message_notify(unsigned long epoint_id, int message_id, union parameter *param);
54         void message_facility(unsigned long epoint_id, int message_id, union parameter *param);
55         void message_overlap(unsigned long epoint_id, int message_id, union parameter *param);
56         void message_proceeding(unsigned long epoint_id, int message_id, union parameter *param);
57         void message_alerting(unsigned long epoint_id, int message_id, union parameter *param);
58         void message_connect(unsigned long epoint_id, int message_id, union parameter *param);
59         void message_disconnect(unsigned long epoint_id, int message_id, union parameter *param);
60         void message_release(unsigned long epoint_id, int message_id, union parameter *param);
61
62         /* IE conversion */
63         void enc_ie_complete(unsigned char **ntmode, msg_t *msg, int complete);
64         void dec_ie_complete(unsigned char *p, Q931_info_t *qi, int *complete);
65         void enc_ie_bearer(unsigned char **ntmode, msg_t *msg, int coding, int capability, int mode, int rate, int multi, int user);
66         void dec_ie_bearer(unsigned char *p, Q931_info_t *qi, int *coding, int *capability, int *mode, int *rate, int *multi, int *user);
67         void enc_ie_call_id(unsigned char **ntmode, msg_t *msg, unsigned char *callid, int callid_len);
68         void dec_ie_call_id(unsigned char *p, Q931_info_t *qi, unsigned char *callid, int *callid_len);
69         void enc_ie_called_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, unsigned char *number);
70         void dec_ie_called_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, unsigned char *number, int number_len);
71         void enc_ie_calling_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, unsigned char *number);
72         void dec_ie_calling_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len);
73         void enc_ie_connected_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, unsigned char *number);
74         void dec_ie_connected_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len);
75         void enc_ie_cause(unsigned char **ntmode, msg_t *msg, int location, int cause);
76         void dec_ie_cause(unsigned char *p, Q931_info_t *qi, int *location, int *cause);
77         void enc_ie_channel_id(unsigned char **ntmode, msg_t *msg, int exclusive, int channel);
78         void dec_ie_channel_id(unsigned char *p, Q931_info_t *qi, int *exclusive, int *channel);
79         void enc_ie_date(unsigned char **ntmode, msg_t *msg, time_t ti, int seconds);
80         void enc_ie_display(unsigned char **ntmode, msg_t *msg, unsigned char *display);
81         void dec_ie_display(unsigned char *p, Q931_info_t *qi, unsigned char *display, int display_len);
82         void enc_ie_keypad(unsigned char **ntmode, msg_t *msg, unsigned char *keypad);
83         void dec_ie_keypad(unsigned char *p, Q931_info_t *qi, unsigned char *keypad, int keypad_len);
84         void enc_ie_notify(unsigned char **ntmode, msg_t *msg, int notify);
85         void dec_ie_notify(unsigned char *p, Q931_info_t *qi, int *notify);
86         void enc_ie_progress(unsigned char **ntmode, msg_t *msg, int coding, int location, int progress);
87         void dec_ie_progress(unsigned char *p, Q931_info_t *qi, int *coding, int *location, int *progress);
88         void enc_ie_hlc(unsigned char **ntmode, msg_t *msg, int coding, int interpretation, int presentation, int hlc, int exthlc);
89         void dec_ie_hlc(unsigned char *p, Q931_info_t *qi, int *coding, int *interpretation, int *presentation, int *hlc, int *exthlc);
90         void enc_ie_redir_nr(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, int reason, unsigned char *number);
91         void dec_ie_redir_nr(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, int *reason, unsigned char *number, int number_len);
92         void enc_ie_redir_dn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, unsigned char *number);
93         void dec_ie_redir_dn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, unsigned char *number, int number_len);
94         void enc_ie_facility(unsigned char **ntmode, msg_t *msg, unsigned char *facility, int facility_len);
95         void dec_ie_facility(unsigned char *p, Q931_info_t *qi, unsigned char *facility, int *facility_len);
96         void enc_facility_centrex(unsigned char **ntmode, msg_t *msg, unsigned char *cnip, int setup);
97         void dec_facility_centrex(unsigned char *p, Q931_info_t *qi, unsigned char *cnip, int cnip_len);
98         void enc_ie_useruser(unsigned char **ntmode, msg_t *msg, int protocol, unsigned char *user, int user_len);
99         void dec_ie_useruser(unsigned char *p, Q931_info_t *qi, int *protocol, unsigned char *user, int *user_len);
100
101 };
102
103