Merge the rest of the FullyBooted patch
[asterisk/asterisk.git] / main / adsistub.c
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 1999 - 2005, Digium, Inc.
5  *
6  * Christopher L. Wade <wade.christopher@gmail.com>
7  *
8  * See http://www.asterisk.org for more information about
9  * the Asterisk project. Please do not directly contact
10  * any of the maintainers of this project for assistance;
11  * the project provides a web site, mailing lists and IRC
12  * channels for your use.
13  *
14  * This program is free software, distributed under the terms of
15  * the GNU General Public License Version 2. See the LICENSE file
16  * at the top of the source tree.
17  */
18
19 #include "asterisk.h"
20
21 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
22
23 #include "asterisk/channel.h"
24 #include "asterisk/adsi.h"
25
26 #ifdef SKREP
27 #define build_stub(func_name,...) \
28 static int stub_ ## func_name(__VA_ARGS__) \
29 { \
30         if (option_debug > 4) \
31                 ast_log(LOG_NOTICE, "ADSI support not loaded!\n"); \
32         return -1; \
33 } \
34 \
35 int (*func_name)(__VA_ARGS__) = \
36         stub_ ## func_name;
37 #endif
38 #define build_stub(func_name,...) \
39 static int stub_##func_name(__VA_ARGS__) \
40 { \
41         ast_debug(5, "ADSI support not loaded!\n"); \
42         return -1; \
43 } \
44 \
45 int (*func_name)(__VA_ARGS__) = \
46         stub_##func_name;
47
48 build_stub(ast_adsi_channel_init, struct ast_channel *chan)
49 build_stub(ast_adsi_begin_download, struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
50 build_stub(ast_adsi_end_download, struct ast_channel *chan)
51 build_stub(ast_adsi_channel_restore, struct ast_channel *chan)
52 build_stub(ast_adsi_print, struct ast_channel *chan, char **lines, int *align, int voice)
53 build_stub(ast_adsi_load_session, struct ast_channel *chan, unsigned char *app, int ver, int data)
54 build_stub(ast_adsi_unload_session, struct ast_channel *chan)
55 build_stub(ast_adsi_transmit_messages, struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype)
56 build_stub(ast_adsi_transmit_message, struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
57 build_stub(ast_adsi_transmit_message_full, struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
58 build_stub(ast_adsi_read_encoded_dtmf, struct ast_channel *chan, unsigned char *buf, int maxlen)
59 build_stub(ast_adsi_connect_session, unsigned char *buf, unsigned char *fdn, int ver)
60 build_stub(ast_adsi_query_cpeid, unsigned char *buf)
61 build_stub(ast_adsi_query_cpeinfo, unsigned char *buf)
62 build_stub(ast_adsi_get_cpeid, struct ast_channel *chan, unsigned char *cpeid, int voice)
63 build_stub(ast_adsi_get_cpeinfo, struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
64 build_stub(ast_adsi_download_connect, unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
65 build_stub(ast_adsi_disconnect_session, unsigned char *buf)
66 build_stub(ast_adsi_download_disconnect, unsigned char *buf)
67 build_stub(ast_adsi_data_mode, unsigned char *buf)
68 build_stub(ast_adsi_clear_soft_keys, unsigned char *buf)
69 build_stub(ast_adsi_clear_screen, unsigned char *buf)
70 build_stub(ast_adsi_voice_mode, unsigned char *buf, int when)
71 build_stub(ast_adsi_available, struct ast_channel *chan)
72 build_stub(ast_adsi_display, unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
73 build_stub(ast_adsi_set_line, unsigned char *buf, int page, int line)
74 build_stub(ast_adsi_load_soft_key, unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data)
75 build_stub(ast_adsi_set_keys, unsigned char *buf, unsigned char *keys)
76 build_stub(ast_adsi_input_control, unsigned char *buf, int page, int line, int display, int format, int just)
77 build_stub(ast_adsi_input_format, unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)