[asterisk-commits] kpfleming: trunk r43309 - in /trunk: apps/ include/asterisk/ res/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Sep 19 21:34:52 MST 2006


Author: kpfleming
Date: Tue Sep 19 23:34:51 2006
New Revision: 43309

URL: http://svn.digium.com/view/asterisk?rev=43309&view=rev
Log:
move ADSI functionality into ast_ namespace

Modified:
    trunk/apps/app_adsiprog.c
    trunk/apps/app_getcpeid.c
    trunk/apps/app_voicemail.c
    trunk/include/asterisk/adsi.h
    trunk/res/res_adsi.c
    trunk/res/res_features.c

Modified: trunk/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_adsiprog.c?rev=43309&r1=43308&r2=43309&view=diff
==============================================================================
--- trunk/apps/app_adsiprog.c (original)
+++ trunk/apps/app_adsiprog.c Tue Sep 19 23:34:51 2006
@@ -1438,11 +1438,11 @@
 		return -1;
 
 	/* Start an empty ADSI Session */
-	if (adsi_load_session(chan, NULL, 0, 1) < 1) 
+	if (ast_adsi_load_session(chan, NULL, 0, 1) < 1) 
 		return -1;
 
 	/* Now begin the download attempt */
-	if (adsi_begin_download(chan, scr->desc, scr->fdn, scr->sec, scr->ver)) {
+	if (ast_adsi_begin_download(chan, scr->desc, scr->fdn, scr->sec, scr->ver)) {
 		/* User rejected us for some reason */
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "User rejected download attempt\n");
@@ -1456,7 +1456,7 @@
 	for (x=0;x<scr->numkeys;x++) {
 		if (bytes + scr->keys[x].retstrlen > 253) {
 			/* Send what we've collected so far */
-			if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
+			if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
 				ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
 				return -1;
 			}
@@ -1469,7 +1469,7 @@
 #endif
 	}
 	if (bytes) {
-		if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
+		if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
 			ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
 			return -1;
 		}
@@ -1480,7 +1480,7 @@
 	for (x=0;x<scr->numdisplays;x++) {
 		if (bytes + scr->displays[x].datalen > 253) {
 			/* Send what we've collected so far */
-			if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
+			if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
 				ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
 				return -1;
 			}
@@ -1493,7 +1493,7 @@
 #endif
 	}
 	if (bytes) {
-		if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
+		if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
 			ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
 			return -1;
 		}
@@ -1504,7 +1504,7 @@
 	for (x=0;x<scr->numsubs;x++) {
 		if (bytes + scr->subs[x].datalen > 253) {
 			/* Send what we've collected so far */
-			if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
+			if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
 				ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
 				return -1;
 			}
@@ -1517,7 +1517,7 @@
 #endif
 	}
 	if (bytes) {
-		if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
+		if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
 			ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
 			return -1;
 		}
@@ -1525,11 +1525,11 @@
 
 
 	bytes = 0;
-	bytes += adsi_display(buf, ADSI_INFO_PAGE, 1, ADSI_JUST_LEFT, 0, "Download complete.", "");
-	bytes += adsi_set_line(buf, ADSI_INFO_PAGE, 1);
-	if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY) < 0)
+	bytes += ast_adsi_display(buf, ADSI_INFO_PAGE, 1, ADSI_JUST_LEFT, 0, "Download complete.", "");
+	bytes += ast_adsi_set_line(buf, ADSI_INFO_PAGE, 1);
+	if (ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY) < 0)
 		return -1;
-	if (adsi_end_download(chan)) {
+	if (ast_adsi_end_download(chan)) {
 		/* Download failed for some reason */
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Download attempt failed\n");
@@ -1538,7 +1538,7 @@
 		return -1;
 	}
 	free(scr);
-	adsi_unload_session(chan);
+	ast_adsi_unload_session(chan);
 	return 0;
 }
 
@@ -1552,7 +1552,7 @@
 	if (ast_strlen_zero(data))
 		data = "asterisk.adsi";
 	
-	if (!adsi_available(chan)) {
+	if (!ast_adsi_available(chan)) {
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "ADSI Unavailable on CPE.  Not bothering to try.\n");
 	} else {

Modified: trunk/apps/app_getcpeid.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_getcpeid.c?rev=43309&r1=43308&r2=43309&view=diff
==============================================================================
--- trunk/apps/app_getcpeid.c (original)
+++ trunk/apps/app_getcpeid.c Tue Sep 19 23:34:51 2006
@@ -60,7 +60,7 @@
 	for (x=0;x<4;x++)
 		tmp[x] = stuff[x];
 	tmp[4] = NULL;
-	return adsi_print(chan, tmp, justify, voice);
+	return ast_adsi_print(chan, tmp, justify, voice);
 }
 
 static int cpeid_exec(struct ast_channel *chan, void *idata)
@@ -83,10 +83,10 @@
 	strncpy(stuff[0], "** CPE Info **", sizeof(data[0]) - 1);
 	strncpy(stuff[1], "Identifying CPE...", sizeof(data[1]) - 1);
 	strncpy(stuff[2], "Please wait...", sizeof(data[2]) - 1);
-	res = adsi_load_session(chan, NULL, 0, 1);
+	res = ast_adsi_load_session(chan, NULL, 0, 1);
 	if (res > 0) {
 		cpeid_setstatus(chan, stuff, 0);
-		res = adsi_get_cpeid(chan, cpeid, 0);
+		res = ast_adsi_get_cpeid(chan, cpeid, 0);
 		if (res > 0) {
 			gotcpeid = 1;
 			if (option_verbose > 2)
@@ -96,7 +96,7 @@
 			strncpy(stuff[1], "Measuring CPE...", sizeof(data[1]) - 1);
 			strncpy(stuff[2], "Please wait...", sizeof(data[2]) - 1);
 			cpeid_setstatus(chan, stuff, 0);
-			res = adsi_get_cpeinfo(chan, &width, &height, &buttons, 0);
+			res = ast_adsi_get_cpeinfo(chan, &width, &height, &buttons, 0);
 			if (res > -1) {
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "CPE has %d lines, %d columns, and %d buttons on '%s'\n", height, width, buttons, chan->name);
@@ -123,7 +123,7 @@
 					break;
 				}
 			}
-			adsi_unload_session(chan);
+			ast_adsi_unload_session(chan);
 		}
 	}
 	ast_module_user_remove(u);

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=43309&r1=43308&r2=43309&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue Sep 19 23:34:51 2006
@@ -3143,8 +3143,8 @@
 static int adsi_logo(unsigned char *buf)
 {
 	int bytes = 0;
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_CENT, 0, "Comedian Mail", "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, "(C)2002 LSS, Inc.", "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_CENT, 0, "Comedian Mail", "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, "(C)2002 LSS, Inc.", "");
 	return bytes;
 }
 
@@ -3156,133 +3156,133 @@
 	char num[5];
 
 	*useadsi = 0;
-	bytes += adsi_data_mode(buf + bytes);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_data_mode(buf + bytes);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 
 	bytes = 0;
 	bytes += adsi_logo(buf);
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Downloading Scripts", "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Downloading Scripts", "");
 #ifdef DISPLAY
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   .", "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   .", "");
 #endif
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	bytes += adsi_data_mode(buf + bytes);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
-
-	if (adsi_begin_download(chan, addesc, adsifdn, adsisec, adsiver)) {
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_data_mode(buf + bytes);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+
+	if (ast_adsi_begin_download(chan, addesc, adsifdn, adsisec, adsiver)) {
 		bytes = 0;
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Load Cancelled.", "");
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "ADSI Unavailable", "");
-		bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-		bytes += adsi_voice_mode(buf + bytes, 0);
-		adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Load Cancelled.", "");
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "ADSI Unavailable", "");
+		bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+		bytes += ast_adsi_voice_mode(buf + bytes, 0);
+		ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 		return 0;
 	}
 
 #ifdef DISPLAY
 	/* Add a dot */
 	bytes = 0;
-	bytes += adsi_logo(buf);
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Downloading Scripts", "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   ..", "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_logo(buf);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Downloading Scripts", "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   ..", "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 #endif
 	bytes = 0;
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 0, "Listen", "Listen", "1", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 1, "Folder", "Folder", "2", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 2, "Advanced", "Advnced", "3", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 3, "Options", "Options", "0", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 4, "Help", "Help", "*", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 5, "Exit", "Exit", "#", 1);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 0, "Listen", "Listen", "1", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 1, "Folder", "Folder", "2", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 2, "Advanced", "Advnced", "3", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 3, "Options", "Options", "0", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 4, "Help", "Help", "*", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 5, "Exit", "Exit", "#", 1);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD);
 
 #ifdef DISPLAY
 	/* Add another dot */
 	bytes = 0;
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   ...", "");
-	bytes += adsi_voice_mode(buf + bytes, 0);
-
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   ...", "");
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 #endif
 
 	bytes = 0;
 	/* These buttons we load but don't use yet */
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 6, "Previous", "Prev", "4", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 8, "Repeat", "Repeat", "5", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 7, "Delete", "Delete", "7", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 9, "Next", "Next", "6", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 10, "Save", "Save", "9", 1);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 11, "Undelete", "Restore", "7", 1);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 6, "Previous", "Prev", "4", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 8, "Repeat", "Repeat", "5", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 7, "Delete", "Delete", "7", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 9, "Next", "Next", "6", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 10, "Save", "Save", "9", 1);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 11, "Undelete", "Restore", "7", 1);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD);
 
 #ifdef DISPLAY
 	/* Add another dot */
 	bytes = 0;
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   ....", "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   ....", "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 #endif
 
 	bytes = 0;
 	for (x=0;x<5;x++) {
 		snprintf(num, sizeof(num), "%d", x);
-		bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 12 + x, mbox(x), mbox(x), num, 1);
-	}
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 12 + 5, "Cancel", "Cancel", "#", 1);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD);
+		bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 12 + x, mbox(x), mbox(x), num, 1);
+	}
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 12 + 5, "Cancel", "Cancel", "#", 1);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD);
 
 #ifdef DISPLAY
 	/* Add another dot */
 	bytes = 0;
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   .....", "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, "   .....", "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 #endif
 
-	if (adsi_end_download(chan)) {
+	if (ast_adsi_end_download(chan)) {
 		bytes = 0;
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Download Unsuccessful.", "");
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "ADSI Unavailable", "");
-		bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-		bytes += adsi_voice_mode(buf + bytes, 0);
-		adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Download Unsuccessful.", "");
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "ADSI Unavailable", "");
+		bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+		bytes += ast_adsi_voice_mode(buf + bytes, 0);
+		ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 		return 0;
 	}
 	bytes = 0;
-	bytes += adsi_download_disconnect(buf + bytes);
-	bytes += adsi_voice_mode(buf + bytes, 0);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD);
+	bytes += ast_adsi_download_disconnect(buf + bytes);
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD);
 
 	ast_log(LOG_DEBUG, "Done downloading scripts...\n");
 
 #ifdef DISPLAY
 	/* Add last dot */
 	bytes = 0;
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "   ......", "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "   ......", "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
 #endif
 	ast_log(LOG_DEBUG, "Restarting session...\n");
 
 	bytes = 0;
 	/* Load the session now */
-	if (adsi_load_session(chan, adsifdn, adsiver, 1) == 1) {
+	if (ast_adsi_load_session(chan, adsifdn, adsiver, 1) == 1) {
 		*useadsi = 1;
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Scripts Loaded!", "");
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Scripts Loaded!", "");
 	} else
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Load Failed!", "");
-
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Load Failed!", "");
+
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 	return 0;
 }
 
 static void adsi_begin(struct ast_channel *chan, int *useadsi)
 {
 	int x;
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
-	x = adsi_load_session(chan, adsifdn, adsiver, 1);
+	x = ast_adsi_load_session(chan, adsifdn, adsiver, 1);
 	if (x < 0)
 		return;
 	if (!x) {
@@ -3300,7 +3300,7 @@
 	int bytes=0;
 	unsigned char keys[8];
 	int x;
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
 
 	for (x=0;x<8;x++)
@@ -3309,15 +3309,15 @@
 	keys[3] = ADSI_KEY_APPS + 3;
 
 	bytes += adsi_logo(buf + bytes);
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, " ", "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, " ", "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	bytes += adsi_input_format(buf + bytes, 1, ADSI_DIR_FROM_LEFT, 0, "Mailbox: ******", "");
-	bytes += adsi_input_control(buf + bytes, ADSI_COMM_PAGE, 4, 1, 1, ADSI_JUST_LEFT);
-	bytes += adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 3, "Enter", "Enter", "#", 1);
-	bytes += adsi_set_keys(buf + bytes, keys);
-	bytes += adsi_voice_mode(buf + bytes, 0);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, " ", "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, " ", "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_input_format(buf + bytes, 1, ADSI_DIR_FROM_LEFT, 0, "Mailbox: ******", "");
+	bytes += ast_adsi_input_control(buf + bytes, ADSI_COMM_PAGE, 4, 1, 1, ADSI_JUST_LEFT);
+	bytes += ast_adsi_load_soft_key(buf + bytes, ADSI_KEY_APPS + 3, "Enter", "Enter", "#", 1);
+	bytes += ast_adsi_set_keys(buf + bytes, keys);
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 }
 
 static void adsi_password(struct ast_channel *chan)
@@ -3326,7 +3326,7 @@
 	int bytes=0;
 	unsigned char keys[8];
 	int x;
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
 
 	for (x=0;x<8;x++)
@@ -3334,12 +3334,12 @@
 	/* Set one key for next */
 	keys[3] = ADSI_KEY_APPS + 3;
 
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	bytes += adsi_input_format(buf + bytes, 1, ADSI_DIR_FROM_LEFT, 0, "Password: ******", "");
-	bytes += adsi_input_control(buf + bytes, ADSI_COMM_PAGE, 4, 0, 1, ADSI_JUST_LEFT);
-	bytes += adsi_set_keys(buf + bytes, keys);
-	bytes += adsi_voice_mode(buf + bytes, 0);
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_input_format(buf + bytes, 1, ADSI_DIR_FROM_LEFT, 0, "Password: ******", "");
+	bytes += ast_adsi_input_control(buf + bytes, ADSI_COMM_PAGE, 4, 0, 1, ADSI_JUST_LEFT);
+	bytes += ast_adsi_set_keys(buf + bytes, keys);
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 }
 
 static void adsi_folders(struct ast_channel *chan, int start, char *label)
@@ -3349,7 +3349,7 @@
 	unsigned char keys[8];
 	int x,y;
 
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
 
 	for (x=0;x<5;x++) {
@@ -3362,13 +3362,13 @@
 	keys[6] = 0;
 	keys[7] = 0;
 
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_CENT, 0, label, "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, " ", "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	bytes += adsi_set_keys(buf + bytes, keys);
-	bytes += adsi_voice_mode(buf + bytes, 0);
-
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_CENT, 0, label, "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, " ", "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_set_keys(buf + bytes, keys);
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 }
 
 static void adsi_message(struct ast_channel *chan, struct vm_state *vms)
@@ -3388,7 +3388,7 @@
 
 	int x;
 
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
 
 	/* Retrieve important info */
@@ -3427,7 +3427,7 @@
 		if (vms->curmsg) {
 			/* but not only message, provide "Folder" instead */
 			keys[3] = ADSI_KEY_SKT | (ADSI_KEY_APPS + 1);
-			bytes += adsi_voice_mode(buf + bytes, 0);
+			bytes += ast_adsi_voice_mode(buf + bytes, 0);
 
 		} else {
 			/* Otherwise if only message, leave blank */
@@ -3453,15 +3453,15 @@
 		strcasecmp(vms->curbox, "INBOX") ? " Messages" : "");
 	snprintf(buf2, sizeof(buf2), "Message %d of %d", vms->curmsg + 1, vms->lastmsg + 1);
 
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_LEFT, 0, buf1, "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_LEFT, 0, buf2, "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_LEFT, 0, name, "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, datetime, "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	bytes += adsi_set_keys(buf + bytes, keys);
-	bytes += adsi_voice_mode(buf + bytes, 0);
-
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_LEFT, 0, buf1, "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_LEFT, 0, buf2, "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_LEFT, 0, name, "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_LEFT, 0, datetime, "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_set_keys(buf + bytes, keys);
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 }
 
 static void adsi_delete(struct ast_channel *chan, struct vm_state *vms)
@@ -3472,7 +3472,7 @@
 
 	int x;
 
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
 
 	/* New meaning for keys */
@@ -3503,10 +3503,10 @@
 
 	/* Except "Exit" */
 	keys[5] = ADSI_KEY_SKT | (ADSI_KEY_APPS + 5);
-	bytes += adsi_set_keys(buf + bytes, keys);
-	bytes += adsi_voice_mode(buf + bytes, 0);
-
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_set_keys(buf + bytes, keys);
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 }
 
 static void adsi_status(struct ast_channel *chan, struct vm_state *vms)
@@ -3519,7 +3519,7 @@
 
 	char *newm = (vms->newmessages == 1) ? "message" : "messages";
 	char *oldm = (vms->oldmessages == 1) ? "message" : "messages";
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
 	if (vms->newmessages) {
 		snprintf(buf1, sizeof(buf1), "You have %d new", vms->newmessages);
@@ -3537,9 +3537,9 @@
 		buf2[0] = ' ';
 		buf2[1] = '\0';
 	}
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_LEFT, 0, buf1, "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_LEFT, 0, buf2, "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_LEFT, 0, buf1, "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_LEFT, 0, buf2, "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
 
 	for (x=0;x<6;x++)
 		keys[x] = ADSI_KEY_SKT | (ADSI_KEY_APPS + x);
@@ -3549,11 +3549,11 @@
 	/* Don't let them listen if there are none */
 	if (vms->lastmsg < 0)
 		keys[0] = 1;
-	bytes += adsi_set_keys(buf + bytes, keys);
-
-	bytes += adsi_voice_mode(buf + bytes, 0);
-
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_set_keys(buf + bytes, keys);
+
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 }
 
 static void adsi_status2(struct ast_channel *chan, struct vm_state *vms)
@@ -3566,7 +3566,7 @@
 
 	char *mess = (vms->lastmsg == 0) ? "message" : "messages";
 
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
 
 	/* Original command keys */
@@ -3586,15 +3586,15 @@
 		snprintf(buf2, sizeof(buf2), "%d %s.", vms->lastmsg + 1, mess);
 	else
 		strcpy(buf2, "no messages.");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_LEFT, 0, buf1, "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_LEFT, 0, buf2, "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_LEFT, 0, "", "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	bytes += adsi_set_keys(buf + bytes, keys);
-
-	bytes += adsi_voice_mode(buf + bytes, 0);
-
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_LEFT, 0, buf1, "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_LEFT, 0, buf2, "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_LEFT, 0, "", "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_set_keys(buf + bytes, keys);
+
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 	
 }
 
@@ -3603,12 +3603,12 @@
 {
 	char buf[256];
 	int bytes=0;
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	bytes += adsi_voice_mode(buf + bytes, 0);
-
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 }
 */
 
@@ -3617,15 +3617,15 @@
 	unsigned char buf[256];
 	int bytes=0;
 
-	if (!adsi_available(chan))
+	if (!ast_adsi_available(chan))
 		return;
 	bytes += adsi_logo(buf + bytes);
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_LEFT, 0, " ", "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Goodbye", "");
-	bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-	bytes += adsi_voice_mode(buf + bytes, 0);
-
-	adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_LEFT, 0, " ", "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Goodbye", "");
+	bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+	bytes += ast_adsi_voice_mode(buf + bytes, 0);
+
+	ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 }
 
 /*--- get_folder: Folder menu ---*/
@@ -5506,13 +5506,13 @@
 	unsigned char buf[256];
 	int bytes=0;
 
-	if (adsi_available(chan)) {
+	if (ast_adsi_available(chan)) {
 		bytes += adsi_logo(buf + bytes);
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "New User Setup", "");
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Not Done", "");
-		bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-		bytes += adsi_voice_mode(buf + bytes, 0);
-		adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "New User Setup", "");
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Not Done", "");
+		bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+		bytes += ast_adsi_voice_mode(buf + bytes, 0);
+		ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 	}
 
 	/* First, have the user change their password 
@@ -5584,14 +5584,14 @@
 	unsigned char buf[256];
 	int bytes=0;
 
-	if (adsi_available(chan))
+	if (ast_adsi_available(chan))
 	{
 		bytes += adsi_logo(buf + bytes);
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Options Menu", "");
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Not Done", "");
-		bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-		bytes += adsi_voice_mode(buf + bytes, 0);
-		adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Options Menu", "");
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Not Done", "");
+		bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+		bytes += ast_adsi_voice_mode(buf + bytes, 0);
+		ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 	}
 	while ((cmd >= 0) && (cmd != 't')) {
 		if (cmd)
@@ -5679,13 +5679,13 @@
 	unsigned char buf[256];
 	int bytes=0;
 
-	if (adsi_available(chan)) {
+	if (ast_adsi_available(chan)) {
 		bytes += adsi_logo(buf + bytes);
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Temp Greeting Menu", "");
-		bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Not Done", "");
-		bytes += adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
-		bytes += adsi_voice_mode(buf + bytes, 0);
-		adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 3, ADSI_JUST_CENT, 0, "Temp Greeting Menu", "");
+		bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 4, ADSI_JUST_CENT, 0, "Not Done", "");
+		bytes += ast_adsi_set_line(buf + bytes, ADSI_COMM_PAGE, 1);
+		bytes += ast_adsi_voice_mode(buf + bytes, 0);
+		ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
 	}
 	snprintf(prefile, sizeof(prefile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, vms->username);
 	while (cmd >= 0 && cmd != 't') {
@@ -6448,7 +6448,7 @@
 				res = 0;
 		}
 		if (useadsi)
-			adsi_unload_session(chan);
+			ast_adsi_unload_session(chan);
 	}
 	if (vmu)
 		close_mailbox(&vms, vmu);

Modified: trunk/include/asterisk/adsi.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/adsi.h?rev=43309&r1=43308&r2=43309&view=diff
==============================================================================
--- trunk/include/asterisk/adsi.h (original)
+++ trunk/include/asterisk/adsi.h Tue Sep 19 23:34:51 2006
@@ -125,22 +125,22 @@
  * Returns 0 on success (or adsi unavailable) and -1 on hangup
  *
  */
-int adsi_channel_init(struct ast_channel *chan);
-
-int adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version);
-
-int adsi_end_download(struct ast_channel *chan);
+int ast_adsi_channel_init(struct ast_channel *chan);
+
+int ast_adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version);
+
+int ast_adsi_end_download(struct ast_channel *chan);
 
 /*! Restore ADSI initialization (for applications that play with ADSI */
 /*   and want to restore it to normal.  If you touch "INFO" then you */
-/*   have to use the adsi_channel_init again instead. */
+/*   have to use the ast_adsi_channel_init again instead. */
 /*!
  * \param chan Channel to restore
  *
  * Returns 0 on success (or adsi unavailable) and -1 on hangup
  *
  */
-int adsi_channel_restore(struct ast_channel *chan);
+int ast_adsi_channel_restore(struct ast_channel *chan);
 
 /*! Display some stuff on the screen */
 /*!
@@ -152,7 +152,7 @@
  * Return 0 on success (or adsi unavailable) and -1 on hangup
  *
  */
-int adsi_print(struct ast_channel *chan, char **lines, int *align, int voice);
+int ast_adsi_print(struct ast_channel *chan, char **lines, int *align, int voice);
 
 /*! Check if scripts for a given app are already loaded.  Version may be -1 */
 /*   if any version is okay, or 0-255 for a specific version. */
@@ -165,18 +165,18 @@
  * Returns 0 if scripts is not loaded or not an ADSI CPE.  Returns -1
  * on hangup.  Returns 1 if script already loaded.
  */
-int adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data);
-int adsi_unload_session(struct ast_channel *chan);
+int ast_adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data);
+int ast_adsi_unload_session(struct ast_channel *chan);
 
 /* ADSI Layer 2 transmission functions */
-int adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype);
-int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype);
-int adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait);
+int ast_adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype);
+int ast_adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype);
+int ast_adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait);
 /*! Read some encoded DTMF data.   */
 /*!
  * Returns number of bytes received
  */
-int adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen);
+int ast_adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen);
 
 /* ADSI Layer 3 creation functions */
 
@@ -190,14 +190,14 @@
  *
  */
 
-int adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver);
+int ast_adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver);
 
 /*! Build Query CPE ID of equipment */
 /*!
  *  Returns number of bytes added to message
  */
-int adsi_query_cpeid(unsigned char *buf);
-int adsi_query_cpeinfo(unsigned char *buf);
+int ast_adsi_query_cpeid(unsigned char *buf);
+int ast_adsi_query_cpeinfo(unsigned char *buf);
 
 /*! Get CPE ID from an attached ADSI compatible CPE. */
 /*!
@@ -205,9 +205,9 @@
  * or -1 on hangup, or 0 if there was no hangup but it failed to find the
  * device ID.  Returns to voice mode if "voice" is non-zero.
  */
-int adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice);
-
-int adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice);
+int ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice);
+
+int ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice);
 
 /*! Begin an ADSI script download */
 /*!
@@ -221,7 +221,7 @@
  *
  */
 
-int adsi_download_connect(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver);
+int ast_adsi_download_connect(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver);
 
 /*! Disconnects a running session */
 /*!
@@ -230,7 +230,7 @@
  * Returns number of bytes added to buffer or -1 on error.
  *
  */
-int adsi_disconnect_session(unsigned char *buf);
+int ast_adsi_disconnect_session(unsigned char *buf);
 
 /*! Disconnects (and hopefully saves) a downloaded script */
 /*!
@@ -239,7 +239,7 @@
  * Returns number of bytes added to buffer or -1 on error.
  *
  */
-int adsi_download_disconnect(unsigned char *buf);
+int ast_adsi_download_disconnect(unsigned char *buf);
 
 /*! Puts CPE in data mode... */
 /*!
@@ -248,9 +248,9 @@
  * Returns number of bytes added to buffer or -1 on error.
  *
  */
-int adsi_data_mode(unsigned char *buf);
-int adsi_clear_soft_keys(unsigned char *buf);
-int adsi_clear_screen(unsigned char *buf);
+int ast_adsi_data_mode(unsigned char *buf);
+int ast_adsi_clear_soft_keys(unsigned char *buf);
+int ast_adsi_clear_screen(unsigned char *buf);
 
 /*! Puts CPE in voice mode... */
 /*!
@@ -260,14 +260,14 @@
  * Returns number of bytes added to buffer or -1 on error.
  *
  */
-int adsi_voice_mode(unsigned char *buf, int when);
+int ast_adsi_voice_mode(unsigned char *buf, int when);
 
 /*! Returns non-zero if Channel does or might support ADSI */
 /*!
  * \param chan Channel to check
  *
  */
-int adsi_available(struct ast_channel *chan);
+int ast_adsi_available(struct ast_channel *chan);
 
 /*! Loads a line of info into the display */
 /*!
@@ -283,7 +283,7 @@
  *
  */
 
-int adsi_display(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2);
+int ast_adsi_display(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2);
 
 /*! Sets the current line and page */
 /*!
@@ -295,7 +295,7 @@
  *
  */
 
-int adsi_set_line(unsigned char *buf, int page, int line);
+int ast_adsi_set_line(unsigned char *buf, int page, int line);
 
 /*! Creates "load soft key" parameters */
 /*!
@@ -309,7 +309,7 @@
  * Returns number of bytes added to buffer or -1 on error.
  *
  */
-int adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, const char *slabel, const char *ret, int data);
+int ast_adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, const char *slabel, const char *ret, int data);
 
 /*! Set which soft keys should be displayed */
 /*!
@@ -320,7 +320,7 @@
  * Returns number of bytes added to buffer or -1 on error.
  *
  */
-int adsi_set_keys(unsigned char *buf, unsigned char *keys);
+int ast_adsi_set_keys(unsigned char *buf, unsigned char *keys);
 
 /*! Set input information */
 /*!
@@ -334,7 +334,7 @@
  * Returns number of bytes added to buffer or -1 on error.
  *
  */
-int adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just);
+int ast_adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just);
 
 /*! Set input format */
 /*!
@@ -348,6 +348,6 @@
  * Returns number of bytes added to buffer or -1 on error.
  *
  */
-int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2);
+int ast_adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2);
 
 #endif /* _ASTERISK_ADSI_H */

Modified: trunk/res/res_adsi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_adsi.c?rev=43309&r1=43308&r2=43309&view=diff
==============================================================================
--- trunk/res/res_adsi.c (original)
+++ trunk/res/res_adsi.c Tue Sep 19 23:34:51 2006
@@ -322,7 +322,7 @@
 	
 }
 
-int adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
+int ast_adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
 {
 	int bytes;
 	unsigned char buf[256];
@@ -330,8 +330,8 @@
 	bytes = 0;
 	/* Setup the resident soft key stuff, a piece at a time */
 	/* Upload what scripts we can for voicemail ahead of time */
-	bytes += adsi_download_connect(buf + bytes, service, fdn, sec, version);
-	if (adsi_transmit_message_full(chan, buf, bytes, ADSI_MSG_DOWNLOAD, 0))
+	bytes += ast_adsi_download_connect(buf + bytes, service, fdn, sec, version);
+	if (ast_adsi_transmit_message_full(chan, buf, bytes, ADSI_MSG_DOWNLOAD, 0))
 		return -1;
 	if (ast_readstring(chan, ack, 1, 10000, 10000, ""))
 		return -1;
@@ -341,20 +341,20 @@
 	return -1;
 }
 
-int adsi_end_download(struct ast_channel *chan)
+int ast_adsi_end_download(struct ast_channel *chan)
 {
 	int bytes;
 	unsigned char buf[256];
         bytes = 0;
         /* Setup the resident soft key stuff, a piece at a time */
         /* Upload what scripts we can for voicemail ahead of time */

[... 397 lines stripped ...]


More information about the asterisk-commits mailing list