Issue #5930 - Remove dependencies on res_adsi.so - clwade
[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 <unistd.h>
20 #include <stdlib.h>
21
22 #include "asterisk.h"
23
24 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
25
26 #include "asterisk/options.h"
27 #include "asterisk/channel.h"
28 #include "asterisk/adsi.h"
29 #include "asterisk/logger.h"
30
31 #ifdef SKREP
32 #define build_stub(func_name,...) \
33 static int stub_ ## func_name(__VA_ARGS__) \
34 { \
35         if (option_debug > 4) \
36                 ast_log(LOG_NOTICE, "ADSI support not loaded!\n"); \
37         return -1; \
38 } \
39 \
40 int (*func_name)(__VA_ARGS__) = \
41         stub_ ## func_name;
42 #endif
43 #define build_stub(func_name,...) \
44 static int stub_##func_name(__VA_ARGS__) \
45 { \
46         if (option_debug > 4) \
47                 ast_log(LOG_DEBUG, "ADSI support not loaded!\n"); \
48         return -1; \
49 } \
50 \
51 int (*func_name)(__VA_ARGS__) = \
52         stub_##func_name;
53
54 build_stub(ast_adsi_channel_init,struct ast_channel *chan)
55 build_stub(ast_adsi_begin_download,struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
56 build_stub(ast_adsi_end_download,struct ast_channel *chan)
57 build_stub(ast_adsi_channel_restore,struct ast_channel *chan)
58 build_stub(ast_adsi_print,struct ast_channel *chan, char **lines, int *align, int voice)
59 build_stub(ast_adsi_load_session,struct ast_channel *chan, unsigned char *app, int ver, int data)
60 build_stub(ast_adsi_unload_session,struct ast_channel *chan)
61 build_stub(ast_adsi_transmit_messages,struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype)
62 build_stub(ast_adsi_transmit_message,struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
63 build_stub(ast_adsi_transmit_message_full,struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
64 build_stub(ast_adsi_read_encoded_dtmf,struct ast_channel *chan, unsigned char *buf, int maxlen)
65 build_stub(ast_adsi_connect_session,unsigned char *buf, unsigned char *fdn, int ver)
66 build_stub(ast_adsi_query_cpeid,unsigned char *buf)
67 build_stub(ast_adsi_query_cpeinfo,unsigned char *buf)
68 build_stub(ast_adsi_get_cpeid,struct ast_channel *chan, unsigned char *cpeid, int voice)
69 build_stub(ast_adsi_get_cpeinfo,struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
70 build_stub(ast_adsi_download_connect,unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
71 build_stub(ast_adsi_disconnect_session,unsigned char *buf)
72 build_stub(ast_adsi_download_disconnect,unsigned char *buf)
73 build_stub(ast_adsi_data_mode,unsigned char *buf)
74 build_stub(ast_adsi_clear_soft_keys,unsigned char *buf)
75 build_stub(ast_adsi_clear_screen,unsigned char *buf)
76 build_stub(ast_adsi_voice_mode,unsigned char *buf, int when)
77 build_stub(ast_adsi_available,struct ast_channel *chan)
78 build_stub(ast_adsi_display,unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
79 build_stub(ast_adsi_set_line,unsigned char *buf, int page, int line)
80 build_stub(ast_adsi_load_soft_key,unsigned char *buf, int key, char *llabel, char *slabel, char *ret, int data)
81 build_stub(ast_adsi_set_keys,unsigned char *buf, unsigned char *keys)
82 build_stub(ast_adsi_input_control,unsigned char *buf, int page, int line, int display, int format, int just)
83 build_stub(ast_adsi_input_format,unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)