[Freeswitch-svn] [commit] r11924 - in freeswitch/branches/gmaruzz/mod_skypiax: . asterisk
FreeSWITCH SVN
gmaruzz at freeswitch.org
Thu Feb 12 07:03:56 PST 2009
Author: gmaruzz
Date: Thu Feb 12 09:03:56 2009
New Revision: 11924
Log:
skypiax: cleaning
Modified:
freeswitch/branches/gmaruzz/mod_skypiax/asterisk/chan_skypiax.c
freeswitch/branches/gmaruzz/mod_skypiax/asterisk/skypiax.h
freeswitch/branches/gmaruzz/mod_skypiax/mod_skypiax.c
freeswitch/branches/gmaruzz/mod_skypiax/skypiax.h
freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c
Modified: freeswitch/branches/gmaruzz/mod_skypiax/asterisk/chan_skypiax.c
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/asterisk/chan_skypiax.c (original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/asterisk/chan_skypiax.c Thu Feb 12 09:03:56 2009
@@ -86,16 +86,16 @@
.hangup = skypiax_hangup,
.answer = skypiax_answer,
.read = skypiax_read,
- .call = skypiax_call,
+ .call = skypiax_originate_call,
.write = skypiax_write,
.indicate = skypiax_indicate,
.fixup = skypiax_fixup,
.devicestate = skypiax_devicestate,
#ifdef ASTERISK_VERSION_1_4
- .send_digit_begin = skypiax_senddigit_begin,
- .send_digit_end = skypiax_senddigit_end,
+ .send_digit_begin = skypiax_digitsend_begin,
+ .send_digit_end = skypiax_digitsend_end,
#else /* ASTERISK_VERSION_1_4 */
- .send_digit = skypiax_senddigit,
+ .send_digit = skypiax_digitsend,
#endif /* ASTERISK_VERSION_1_4 */
};
@@ -472,7 +472,7 @@
}
#ifdef ASTERISK_VERSION_1_4
-int skypiax_senddigit_begin(struct ast_channel *c, char digit)
+int skypiax_digitsend_begin(struct ast_channel *c, char digit)
{
struct skypiax_pvt *p = c->tech_pvt;
@@ -481,7 +481,7 @@
return 0;
}
-int skypiax_senddigit_end(struct ast_channel *c, char digit, unsigned int duration)
+int skypiax_digitsend_end(struct ast_channel *c, char digit, unsigned int duration)
{
struct skypiax_pvt *p = c->tech_pvt;
char msg_to_skype[1024];
@@ -495,7 +495,7 @@
return 0;
}
#else /* ASTERISK_VERSION_1_4 */
-int skypiax_senddigit(struct ast_channel *c, char digit)
+int skypiax_digitsend(struct ast_channel *c, char digit)
{
struct skypiax_pvt *p = c->tech_pvt;
char msg_to_skype[1024];
@@ -576,7 +576,7 @@
/*! \brief Initiate skypiax call from PBX
* used from the dial() application
*/
-int skypiax_call(struct ast_channel *c, char *idest, int timeout)
+int skypiax_originate_call(struct ast_channel *c, char *idest, int timeout)
{
struct skypiax_pvt *p = NULL;
p = c->tech_pvt;
@@ -586,12 +586,12 @@
if ((c->_state != SKYPIAX_STATE_DOWN)
&& (c->_state != SKYPIAX_STATE_RESERVED)) {
- ERRORA("skypiax_call called on %s, neither down nor reserved\n", SKYPIAX_P_LOG,
+ ERRORA("skypiax_originate_call called on %s, neither down nor reserved\n", SKYPIAX_P_LOG,
c->name);
return -1;
}
- DEBUGA_PBX("skypiax_call to call idest: %s, timeout: %d!\n", SKYPIAX_P_LOG, idest,
+ DEBUGA_PBX("skypiax_originate_call to call idest: %s, timeout: %d!\n", SKYPIAX_P_LOG, idest,
timeout);
strncpy(rdest, idest, sizeof(rdest) - 1);
@@ -605,17 +605,17 @@
}
strncpy(dstr, where + p->stripmsd, sizeof(dstr) - 1);
- DEBUGA_PBX("skypiax_call dialing idest: %s, timeout: %d, dstr: %s!\n", SKYPIAX_P_LOG,
+ DEBUGA_PBX("skypiax_originate_call dialing idest: %s, timeout: %d, dstr: %s!\n", SKYPIAX_P_LOG,
idest, timeout, dstr);
strcpy(p->session_uuid_str, "dialing");
- status = skypiax__call(p, dstr, timeout);
+ status = skypiax_call(p, dstr, timeout);
if (status) {
- WARNINGA("skypiax_call dialing failed: %d!\n", SKYPIAX_P_LOG, status);
+ WARNINGA("skypiax_originate_call dialing failed: %d!\n", SKYPIAX_P_LOG, status);
return -1;
}
- DEBUGA_PBX("skypiax_call dialed idest: %s, timeout: %d, dstr: %s!\n", SKYPIAX_P_LOG,
+ DEBUGA_PBX("skypiax_originate_call dialed idest: %s, timeout: %d, dstr: %s!\n", SKYPIAX_P_LOG,
idest, timeout, dstr);
ast_setstate(p->owner, SKYPIAX_STATE_DIALING);
@@ -813,7 +813,7 @@
ast_log(LOG_ERROR, "Not initialized XInitThreads!\n");
#endif /* __CYGWIN__ */
#if 0
- ast_register_atexit(skypiax__disconnect);
+ ast_register_atexit(skypiax_disconnect);
ast_register_application(skype2skypiaxapp, skype2skypiax, skype2skypiaxsynopsis,
skype2skypiaxdescrip);
ast_register_application(skypiax2skypeapp, skypiax2skype, skypiax2skypesynopsis,
@@ -927,7 +927,7 @@
//FIXME what to do? ast_log(LOG_ERROR, "Not initialized XInitThreads!\n");
#endif /* __CYGWIN__ */
#if 0
- ast_unregister_atexit(skypiax__disconnect);
+ ast_unregister_atexit(skypiax_disconnect);
ast_unregister_application(skype2skypiaxapp);
ast_unregister_application(skypiax2skypeapp);
#endif
Modified: freeswitch/branches/gmaruzz/mod_skypiax/asterisk/skypiax.h
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/asterisk/skypiax.h (original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/asterisk/skypiax.h Thu Feb 12 09:03:56 2009
@@ -316,16 +316,16 @@
void *do_skypeapi_thread(void *data);
//int skypiax2skype(struct ast_channel *c, void *data);
//int skype2skypiax(struct ast_channel *c, void *data);
-//void skypiax__disconnect(void);
+//void skypiax_disconnect(void);
int skypiax_signaling_write(struct skypiax_pvt *p, char *msg_to_skype);
int skypiax_signaling_read(struct skypiax_pvt *p);
int skypiax_console_skype(int fd, int argc, char *argv[]);
#ifdef WANT_SKYPE_X11
int X11_errors_handler(Display * dpy, XErrorEvent * err);
-int skypiax__send_message(struct SkypiaxHandles *SkypiaxHandles,
+int skypiax_send_message(struct SkypiaxHandles *SkypiaxHandles,
const char *message_P);
-int skypiax__present(struct SkypiaxHandles *SkypiaxHandles);
-void skypiax__clean_disp(void *data);
+int skypiax_present(struct SkypiaxHandles *SkypiaxHandles);
+void skypiax_clean_disp(void *data);
#endif /* WANT_SKYPE_X11 */
#ifdef __CYGWIN__
@@ -345,7 +345,7 @@
struct ast_channel *skypiax_request(const char *type, int format, void *data, int *cause);
int skypiax_answer(struct ast_channel *c);
int skypiax_hangup(struct ast_channel *c);
-int skypiax_call(struct ast_channel *c, char *idest, int timeout);
+int skypiax_originate_call(struct ast_channel *c, char *idest, int timeout);
struct ast_frame *skypiax_read(struct ast_channel *chan);
int skypiax_write(struct ast_channel *c, struct ast_frame *f);
int skypiax_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
@@ -356,10 +356,10 @@
#endif
int skypiax_devicestate(void *data);
#ifdef ASTERISK_VERSION_1_4
-int skypiax_senddigit_begin(struct ast_channel *ast, char digit);
-int skypiax_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration);
+int skypiax_digitsend_begin(struct ast_channel *ast, char digit);
+int skypiax_digitsend_end(struct ast_channel *ast, char digit, unsigned int duration);
#else /* ASTERISK_VERSION_1_4 */
-int skypiax_senddigit(struct ast_channel *ast, char digit);
+int skypiax_digitsend(struct ast_channel *ast, char digit);
#endif /* ASTERISK_VERSION_1_4 */
/* chan_skypiax internal functions */
@@ -392,7 +392,7 @@
void *skypiax_do_tcp_srv_thread(void *data);
int skypiax_audio_write(struct skypiax_pvt *p, struct ast_frame *f);
void *skypiax_do_tcp_cli_thread(void *data);
-int skypiax__call(struct skypiax_pvt *p, char *idest, int timeout);
+int skypiax_call(struct skypiax_pvt *p, char *idest, int timeout);
int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[]);
void *skypiax_do_tcp_srv_thread_func(void *obj);
@@ -402,7 +402,7 @@
int start_audio_threads(private_t * tech_pvt);
int new_inbound_channel(private_t * tech_pvt);
int outbound_channel_answered(private_t * tech_pvt);
-int skypiax__senddigit(struct skypiax_pvt *p, char digit);
+int skypiax_senddigit(struct skypiax_pvt *p, char digit);
int skypiax_signaling_write(private_t * tech_pvt, char *msg_to_skype);
#if defined(WIN32) && !defined(__CYGWIN__)
int skypiax_pipe_read(switch_file_t * pipe, short *buf, int howmany);
Modified: freeswitch/branches/gmaruzz/mod_skypiax/mod_skypiax.c
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/mod_skypiax.c (original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/mod_skypiax.c Thu Feb 12 09:03:56 2009
@@ -270,7 +270,7 @@
DEBUGA_SKYPE("DTMF: %c\n", SKYPIAX_P_LOG, dtmf->digit);
- skypiax__senddigit(tech_pvt, dtmf->digit);
+ skypiax_senddigit(tech_pvt, dtmf->digit);
return SWITCH_STATUS_SUCCESS;
}
@@ -562,7 +562,7 @@
rdest = strchr(caller_profile->destination_number, '/');
*rdest++ = '\0';
- skypiax__call(tech_pvt, rdest, 30);
+ skypiax_call(tech_pvt, rdest, 30);
switch_copy_string(tech_pvt->session_uuid_str,
switch_core_session_get_uuid(*new_session),
Modified: freeswitch/branches/gmaruzz/mod_skypiax/skypiax.h
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/skypiax.h (original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/skypiax.h Thu Feb 12 09:03:56 2009
@@ -242,8 +242,8 @@
int skypiax_signaling_write(private_t * tech_pvt, char *msg_to_skype);
int skypiax_signaling_read(private_t * tech_pvt);
-int skypiax__call(private_t * tech_pvt, char *idest, int timeout);
-int skypiax__senddigit(private_t * tech_pvt, char digit);
+int skypiax_call(private_t * tech_pvt, char *idest, int timeout);
+int skypiax_senddigit(private_t * tech_pvt, char digit);
void *skypiax_do_tcp_srv_thread_func(void *obj);
void *SWITCH_THREAD_FUNC skypiax_do_tcp_srv_thread(switch_thread_t * thread, void *obj);
Modified: freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c (original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c Thu Feb 12 09:03:56 2009
@@ -707,7 +707,7 @@
return 1;
}
-int skypiax__senddigit(private_t * tech_pvt, char digit)
+int skypiax_senddigit(private_t * tech_pvt, char digit)
{
char msg_to_skype[1024];
@@ -718,7 +718,7 @@
return 0;
}
-int skypiax__call(private_t * tech_pvt, char *rdest, int timeout)
+int skypiax_call(private_t * tech_pvt, char *rdest, int timeout)
{
char msg_to_skype[1024];
@@ -897,7 +897,7 @@
}
-LRESULT APIENTRY skypiax__present(HWND hWindow, UINT uiMessage, WPARAM uiParam,
+LRESULT APIENTRY skypiax_present(HWND hWindow, UINT uiMessage, WPARAM uiParam,
LPARAM ulParam)
{
LRESULT lReturnCode;
@@ -1016,7 +1016,7 @@
(char *) paucUUIDString);
oWindowClass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
- oWindowClass.lpfnWndProc = (WNDPROC) & skypiax__present;
+ oWindowClass.lpfnWndProc = (WNDPROC) & skypiax_present;
oWindowClass.cbClsExtra = 0;
oWindowClass.cbWndExtra = 0;
oWindowClass.hInstance = tech_pvt->SkypiaxHandles.win32_hInit_ProcessHandle;
@@ -1141,7 +1141,7 @@
return (xerror != BadValue) && (xerror != BadWindow);
}
-int skypiax__send_message(struct SkypiaxHandles *SkypiaxHandles,
+int skypiax_send_message(struct SkypiaxHandles *SkypiaxHandles,
const char *message_P)
{
@@ -1197,7 +1197,7 @@
SkypiaxHandles = &tech_pvt->SkypiaxHandles;
- if (!skypiax__send_message(SkypiaxHandles, msg_to_skype)) {
+ if (!skypiax_send_message(SkypiaxHandles, msg_to_skype)) {
ERRORA
("Sending message failed - probably Skype crashed.\n\nPlease shutdown Skypiax, then restart Skype, then launch Skypiax and try again.\n",
SKYPIAX_P_LOG);
@@ -1208,7 +1208,7 @@
}
-int skypiax__present(struct SkypiaxHandles *SkypiaxHandles)
+int skypiax_present(struct SkypiaxHandles *SkypiaxHandles)
{
Atom skype_inst = XInternAtom(SkypiaxHandles->disp, "_SKYPE_INSTANCE", True);
@@ -1242,7 +1242,7 @@
return 1;
}
-void skypiax__clean_disp(void *data)
+void skypiax_clean_disp(void *data)
{
int *dispptr;
@@ -1303,7 +1303,7 @@
SkypiaxHandles->disp = disp;
- if (skypiax__present(SkypiaxHandles)) {
+ if (skypiax_present(SkypiaxHandles)) {
root = DefaultRootWindow(disp);
win =
XCreateSimpleWindow(disp, root, 0, 0, 1, 1, 0,
@@ -1315,7 +1315,7 @@
snprintf(buf, 512, "NAME skypiax");
- if (!skypiax__send_message(SkypiaxHandles, buf)) {
+ if (!skypiax_send_message(SkypiaxHandles, buf)) {
ERRORA
("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch Skypiax again\n",
SKYPIAX_P_LOG);
@@ -1324,7 +1324,7 @@
}
snprintf(buf, 512, "PROTOCOL 7");
- if (!skypiax__send_message(SkypiaxHandles, buf)) {
+ if (!skypiax_send_message(SkypiaxHandles, buf)) {
ERRORA
("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch Skypiax again\n",
SKYPIAX_P_LOG);
More information about the Freeswitch-svn
mailing list