Please, do not reply to this mailing list, use wengophone-devel instead.
------------------------------------------------------------------------
Author: tmonjalon
Date: 2007-03-30 09:48:43 +0200 (Fri, 30 Mar 2007)
New Revision: 10555
Modified:
wifo/branches/transport_refactoring/phapi/phapi-old.c
wifo/branches/transport_refactoring/phapi/phapi-old.h
wifo/branches/transport_refactoring/phapi/phapi.c
wifo/branches/transport_refactoring/phapi/phapi.h
wifo/branches/transport_refactoring/phapi/phvline.c
wifo/branches/transport_refactoring/phapi/phvline.h
Log:
* (add) transport protocol in vline in phAPI
Modified: wifo/branches/transport_refactoring/phapi/phapi-old.c
===================================================================
--- wifo/branches/transport_refactoring/phapi/phapi-old.c 2007-03-29
16:35:15 UTC (rev 10554)
+++ wifo/branches/transport_refactoring/phapi/phapi-old.c 2007-03-30
07:48:43 UTC (rev 10555)
@@ -311,7 +311,7 @@
#ifdef EMBED
phConfig_t phcfg = {"10600", "",
-/* sipport */ "5060",
+/* sipport */ 5060,5062,5061,
/* identity */ "",
/* proxy */ "" ,
/* nattype */ "" ,
@@ -326,7 +326,7 @@
};
#else
phConfig_t phcfg = {"10600", "", "10700", "",
-/* sipport */ "5060",
+/* sipport */ 5060,5062,5061,
/* identity */ "",
/* proxy */ "" ,
/* nattype */ "" ,
@@ -1854,9 +1854,9 @@
}
int
-phAddVline(const char* username, const char *server, const char* proxy, int
regTimeout)
+phAddVline(const char* username, const char *server, const char* proxy,
TransportProtocol protocol, int regTimeout)
{
- return phAddVline2(NULL, username, server, proxy, regTimeout);
+ return phAddVline2(NULL, username, server, proxy, protocol, regTimeout);
}
/*
@@ -1902,7 +1902,7 @@
eXosip_tunnel_t *phTunnel;
int
-phAddVline2(const char *displayname, const char* username, const char *server,
const char* proxy, int regTimeout)
+phAddVline2(const char *displayname, const char* username, const char *server,
const char* proxy, TransportProtocol protocol, int regTimeout)
{
phVLine *vl;
int oldTimeout = 0;
@@ -1987,6 +1987,7 @@
oldTimeout = vl->regTimeout;
}
+ vl->protocol = protocol ;
vl->port = port;
if (nonempty(proxy))
Modified: wifo/branches/transport_refactoring/phapi/phapi-old.h
===================================================================
--- wifo/branches/transport_refactoring/phapi/phapi-old.h 2007-03-29
16:35:15 UTC (rev 10554)
+++ wifo/branches/transport_refactoring/phapi/phapi-old.h 2007-03-30
07:48:43 UTC (rev 10555)
@@ -127,7 +127,10 @@
*/
struct phcall;
+
+#include <transport_manager.h>
+
#ifdef WIN32
#if defined(BUILD_PHAPI_DLL)
#define MY_DLLEXPORT __declspec(dllexport)
@@ -212,8 +215,8 @@
* to unergister one should do phDelVline (or phUnregister
-- depreciated)
* @return -1 in case of error vlid in case of success
*/
-MY_DLLEXPORT int phAddVline(const char* username, const char *host, const
char* proxy, int regTimeout);
-MY_DLLEXPORT int phAddVline2(const char* displayname, const char* username,
const char *host, const char* proxy, int regTimeout);
+MY_DLLEXPORT int phAddVline(const char* username, const char *host, const
char* proxy, TransportProtocol protocol, int regTimeout);
+MY_DLLEXPORT int phAddVline2(const char* displayname, const char* username,
const char *host, const char* proxy, TransportProtocol protocol, int
regTimeout);
/**
* Delete virtual line
Modified: wifo/branches/transport_refactoring/phapi/phapi.c
===================================================================
--- wifo/branches/transport_refactoring/phapi/phapi.c 2007-03-29 16:35:15 UTC
(rev 10554)
+++ wifo/branches/transport_refactoring/phapi/phapi.c 2007-03-30 07:48:43 UTC
(rev 10555)
@@ -570,9 +570,10 @@
*/
MY_DLLEXPORT OWPL_RESULT
owplLineAdd(const char* displayname,
- const char* username,
- const char* server,
- const char* proxy,
+ const char* username,
+ const char* server,
+ const char* proxy,
+ TransportProtocol protocol,
int regTimeout,
OWPL_LINE * phLine)
{
@@ -590,7 +591,7 @@
* (this function send a REGISTER message if timeout > 0 and we
have shouldn't change it
* for backward compatibility
*/
- ret = phAddVline2(displayname, username, server, proxy, 0);
+ ret = phAddVline2(displayname, username, server, proxy, protocol, 0);
if (ret < 0) {
return OWPL_RESULT_FAILURE;
}
Modified: wifo/branches/transport_refactoring/phapi/phapi.h
===================================================================
--- wifo/branches/transport_refactoring/phapi/phapi.h 2007-03-29 16:35:15 UTC
(rev 10554)
+++ wifo/branches/transport_refactoring/phapi/phapi.h 2007-03-30 07:48:43 UTC
(rev 10555)
@@ -365,6 +365,7 @@
* otherwise it should be set to IP address or hostname of
the local machine
* @param proxy outgoing proxy URI (all calls using this virtual line
will be routed
* through this proxy)
+ * @param protocol tranport protocol used to connect
* @param regTimeout registration timeout (when 0 will NOT use registrations)
* to unergister one should do phDelVline (or phUnregister
-- depreciated)
* @param phLine the handle to the newly created line
@@ -375,6 +376,7 @@
const char* username,
const char *server,
const char* proxy,
+ TransportProtocol protocol,
int regTimeout,
OWPL_LINE * phLine);
Modified: wifo/branches/transport_refactoring/phapi/phvline.c
===================================================================
--- wifo/branches/transport_refactoring/phapi/phvline.c 2007-03-29 16:35:15 UTC
(rev 10554)
+++ wifo/branches/transport_refactoring/phapi/phvline.c 2007-03-30 07:48:43 UTC
(rev 10555)
@@ -318,7 +318,7 @@
eXosip_lock();
- vl->rid = eXosip_register_init(utmp, server, vl->contact, vl->proxy,
TRANSPORT_UDP);
+ vl->rid = eXosip_register_init(utmp, server, vl->contact, vl->proxy,
vl->protocol);
if (vl->rid >= 0)
{
Modified: wifo/branches/transport_refactoring/phapi/phvline.h
===================================================================
--- wifo/branches/transport_refactoring/phapi/phvline.h 2007-03-29 16:35:15 UTC
(rev 10554)
+++ wifo/branches/transport_refactoring/phapi/phvline.h 2007-03-30 07:48:43 UTC
(rev 10555)
@@ -2,6 +2,7 @@
#define _OWPL_VLINE_HEADER_
#include <owpl.h>
+#include <transport_manager.h>
typedef enum VLineStateEnum_T
{
@@ -29,6 +30,7 @@
{
char *displayname;
char *username;
+ TransportProtocol protocol;
char *server;
int port;
char *proxy;
------------------------------------------------------------------------
_______________________________________________
Wengophone-commit mailing list
[EMAIL PROTECTED]
http://dev.openwengo.com/mailman/listinfo/wengophone-commit