* #27232: jni: added pjproject checkout as regular git content
We will remove it once the next release of pjsip (with Android support)
comes out and is merged into SFLphone.
diff --git a/jni/pjproject-android/.svn/pristine/a9/a945028e8550ef388c86b269e4a33d643328ee70.svn-base b/jni/pjproject-android/.svn/pristine/a9/a945028e8550ef388c86b269e4a33d643328ee70.svn-base
new file mode 100644
index 0000000..395c3fe
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a9/a945028e8550ef388c86b269e4a33d643328ee70.svn-base
@@ -0,0 +1,18 @@
+Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
+ All the code except the following
+
+David Rowe <david@rowetel.com>
+ lsp.c lsp.h
+ Also ideas and feedback
+
+John Francis Edwards
+ wave_out.[ch], some #ifdefs for windows port and MSVC project files
+
+Segher Boessenkool
+ Misc. optimizations (for QMF in particular)
+
+Atsuhiko Yamanaka <ymnk@jcraft.com>:
+ Patch to speexenc.c to add Vorbis comment format
+
+Radim Kolar <hsn@cybermail.net>:
+ Patch to speexenc.c for supporting more input formats
diff --git a/jni/pjproject-android/.svn/pristine/a9/a96da29c7d0d6e78afc95ec87f0a6f08211e8d02.svn-base b/jni/pjproject-android/.svn/pristine/a9/a96da29c7d0d6e78afc95ec87f0a6f08211e8d02.svn-base
new file mode 100644
index 0000000..c8f9098
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a9/a96da29c7d0d6e78afc95ec87f0a6f08211e8d02.svn-base
@@ -0,0 +1 @@
+#include "../../../portaudio/src/common/pa_dither.h"
diff --git a/jni/pjproject-android/.svn/pristine/a9/a9b40f79888ad9213852517064133cf9e887006b.svn-base b/jni/pjproject-android/.svn/pristine/a9/a9b40f79888ad9213852517064133cf9e887006b.svn-base
new file mode 100644
index 0000000..4216319
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a9/a9b40f79888ad9213852517064133cf9e887006b.svn-base
@@ -0,0 +1,38 @@
+# $Id$
+import inc_sip as sip
+import inc_sdp as sdp
+
+body = \
+"""
+--12345
+Content-Type: application/sdp
+
+v=0
+o=- 0 0 IN IP4 127.0.0.1
+s=pjmedia
+c=IN IP4 127.0.0.1
+t=0 0
+m=audio 4000 RTP/AVP 0 101
+a=rtpmap:0 PCMU/8000
+a=sendrecv
+a=rtpmap:101 telephone-event/8000
+a=fmtp:101 0-15
+
+--12345
+Content-Type: text/plain
+
+Hi there this is definitely not SDP
+
+--12345--
+"""
+
+args = "--null-audio --auto-answer 200 --max-calls 1"
+extra_headers = "Content-Type: multipart/mixed; boundary=12345"
+include = ["v=0", "m=audio"]
+exclude = []
+
+sendto_cfg = sip.SendtoCfg( "Valid multipart/mixed body containing SDP",
+ pjsua_args=args, sdp="", resp_code=200,
+ extra_headers=extra_headers, body=body,
+ resp_inc=include, resp_exc=exclude)
+
diff --git a/jni/pjproject-android/.svn/pristine/a9/a9c8879fc2103cd09bc8f0624b01d5d83e6b8783.svn-base b/jni/pjproject-android/.svn/pristine/a9/a9c8879fc2103cd09bc8f0624b01d5d83e6b8783.svn-base
new file mode 100644
index 0000000..fb730fd
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a9/a9c8879fc2103cd09bc8f0624b01d5d83e6b8783.svn-base
@@ -0,0 +1,282 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include <pj/addr_resolv.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+#include <pj/errno.h>
+#include <pj/ip_helper.h>
+#include <pj/compat/socket.h>
+
+#if defined(PJ_GETADDRINFO_USE_CFHOST) && PJ_GETADDRINFO_USE_CFHOST!=0
+# include <CoreFoundation/CFString.h>
+# include <CFNetwork/CFHost.h>
+#endif
+
+PJ_DEF(pj_status_t) pj_gethostbyname(const pj_str_t *hostname, pj_hostent *phe)
+{
+ struct hostent *he;
+ char copy[PJ_MAX_HOSTNAME];
+
+ pj_assert(hostname && hostname ->slen < PJ_MAX_HOSTNAME);
+
+ if (hostname->slen >= PJ_MAX_HOSTNAME)
+ return PJ_ENAMETOOLONG;
+
+ pj_memcpy(copy, hostname->ptr, hostname->slen);
+ copy[ hostname->slen ] = '\0';
+
+ he = gethostbyname(copy);
+ if (!he) {
+ return PJ_ERESOLVE;
+ /* DO NOT use pj_get_netos_error() since host resolution error
+ * is reported in h_errno instead of errno!
+ return pj_get_netos_error();
+ */
+ }
+
+ phe->h_name = he->h_name;
+ phe->h_aliases = he->h_aliases;
+ phe->h_addrtype = he->h_addrtype;
+ phe->h_length = he->h_length;
+ phe->h_addr_list = he->h_addr_list;
+
+ return PJ_SUCCESS;
+}
+
+/* Resolve IPv4/IPv6 address */
+PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename,
+ unsigned *count, pj_addrinfo ai[])
+{
+#if defined(PJ_SOCK_HAS_GETADDRINFO) && PJ_SOCK_HAS_GETADDRINFO!=0
+ char nodecopy[PJ_MAX_HOSTNAME];
+ pj_bool_t has_addr = PJ_FALSE;
+ unsigned i;
+#if defined(PJ_GETADDRINFO_USE_CFHOST) && PJ_GETADDRINFO_USE_CFHOST!=0
+ CFStringRef hostname;
+ CFHostRef hostRef;
+ pj_status_t status = PJ_SUCCESS;
+#else
+ int rc;
+ struct addrinfo hint, *res, *orig_res;
+#endif
+
+ PJ_ASSERT_RETURN(nodename && count && *count && ai, PJ_EINVAL);
+ PJ_ASSERT_RETURN(nodename->ptr && nodename->slen, PJ_EINVAL);
+ PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6 ||
+ af==PJ_AF_UNSPEC, PJ_EINVAL);
+
+ /* Check if nodename is IP address */
+ pj_bzero(&ai[0], sizeof(ai[0]));
+ if ((af==PJ_AF_INET || af==PJ_AF_UNSPEC) &&
+ pj_inet_pton(PJ_AF_INET, nodename,
+ &ai[0].ai_addr.ipv4.sin_addr) == PJ_SUCCESS)
+ {
+ af = PJ_AF_INET;
+ has_addr = PJ_TRUE;
+ } else if ((af==PJ_AF_INET6 || af==PJ_AF_UNSPEC) &&
+ pj_inet_pton(PJ_AF_INET6, nodename,
+ &ai[0].ai_addr.ipv6.sin6_addr) == PJ_SUCCESS)
+ {
+ af = PJ_AF_INET6;
+ has_addr = PJ_TRUE;
+ }
+
+ if (has_addr) {
+ pj_str_t tmp;
+
+ tmp.ptr = ai[0].ai_canonname;
+ pj_strncpy_with_null(&tmp, nodename, PJ_MAX_HOSTNAME);
+ ai[0].ai_addr.addr.sa_family = (pj_uint16_t)af;
+ *count = 1;
+
+ return PJ_SUCCESS;
+ }
+
+ /* Copy node name to null terminated string. */
+ if (nodename->slen >= PJ_MAX_HOSTNAME)
+ return PJ_ENAMETOOLONG;
+ pj_memcpy(nodecopy, nodename->ptr, nodename->slen);
+ nodecopy[nodename->slen] = '\0';
+
+#if defined(PJ_GETADDRINFO_USE_CFHOST) && PJ_GETADDRINFO_USE_CFHOST!=0
+ hostname = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, nodecopy,
+ kCFStringEncodingASCII,
+ kCFAllocatorNull);
+ hostRef = CFHostCreateWithName(kCFAllocatorDefault, hostname);
+ if (CFHostStartInfoResolution(hostRef, kCFHostAddresses, nil)) {
+ CFArrayRef addrRef = CFHostGetAddressing(hostRef, nil);
+ i = 0;
+ if (addrRef != nil) {
+ CFIndex idx, naddr;
+
+ naddr = CFArrayGetCount(addrRef);
+ for (idx = 0; idx < naddr && i < *count; idx++) {
+ struct sockaddr *addr;
+
+ addr = (struct sockaddr *)
+ CFDataGetBytePtr(CFArrayGetValueAtIndex(addrRef, idx));
+ /* This should not happen. */
+ pj_assert(addr);
+
+ /* Ignore unwanted address families */
+ if (af!=PJ_AF_UNSPEC && addr->sa_family != af)
+ continue;
+
+ /* Store canonical name */
+ pj_ansi_strcpy(ai[i].ai_canonname, nodecopy);
+
+ /* Store address */
+ PJ_ASSERT_ON_FAIL(sizeof(*addr) <= sizeof(pj_sockaddr),
+ continue);
+ pj_memcpy(&ai[i].ai_addr, addr, sizeof(*addr));
+ PJ_SOCKADDR_RESET_LEN(&ai[i].ai_addr);
+
+ i++;
+ }
+ }
+
+ *count = i;
+ } else {
+ status = PJ_ERESOLVE;
+ }
+
+ CFRelease(hostRef);
+ CFRelease(hostname);
+
+ return status;
+#else
+ /* Call getaddrinfo() */
+ pj_bzero(&hint, sizeof(hint));
+ hint.ai_family = af;
+
+ rc = getaddrinfo(nodecopy, NULL, &hint, &res);
+ if (rc != 0)
+ return PJ_ERESOLVE;
+
+ orig_res = res;
+
+ /* Enumerate each item in the result */
+ for (i=0; i<*count && res; res=res->ai_next) {
+ /* Ignore unwanted address families */
+ if (af!=PJ_AF_UNSPEC && res->ai_family != af)
+ continue;
+
+ /* Store canonical name (possibly truncating the name) */
+ if (res->ai_canonname) {
+ pj_ansi_strncpy(ai[i].ai_canonname, res->ai_canonname,
+ sizeof(ai[i].ai_canonname));
+ ai[i].ai_canonname[sizeof(ai[i].ai_canonname)-1] = '\0';
+ } else {
+ pj_ansi_strcpy(ai[i].ai_canonname, nodecopy);
+ }
+
+ /* Store address */
+ PJ_ASSERT_ON_FAIL(res->ai_addrlen <= sizeof(pj_sockaddr), continue);
+ pj_memcpy(&ai[i].ai_addr, res->ai_addr, res->ai_addrlen);
+ PJ_SOCKADDR_RESET_LEN(&ai[i].ai_addr);
+
+ /* Next slot */
+ ++i;
+ }
+
+ *count = i;
+
+ freeaddrinfo(orig_res);
+
+ /* Done */
+ return PJ_SUCCESS;
+#endif
+
+#else /* PJ_SOCK_HAS_GETADDRINFO */
+ pj_bool_t has_addr = PJ_FALSE;
+
+ PJ_ASSERT_RETURN(count && *count, PJ_EINVAL);
+
+ /* Check if nodename is IP address */
+ pj_bzero(&ai[0], sizeof(ai[0]));
+ if ((af==PJ_AF_INET || af==PJ_AF_UNSPEC) &&
+ pj_inet_pton(PJ_AF_INET, nodename,
+ &ai[0].ai_addr.ipv4.sin_addr) == PJ_SUCCESS)
+ {
+ af = PJ_AF_INET;
+ has_addr = PJ_TRUE;
+ }
+ else if ((af==PJ_AF_INET6 || af==PJ_AF_UNSPEC) &&
+ pj_inet_pton(PJ_AF_INET6, nodename,
+ &ai[0].ai_addr.ipv6.sin6_addr) == PJ_SUCCESS)
+ {
+ af = PJ_AF_INET6;
+ has_addr = PJ_TRUE;
+ }
+
+ if (has_addr) {
+ pj_str_t tmp;
+
+ tmp.ptr = ai[0].ai_canonname;
+ pj_strncpy_with_null(&tmp, nodename, PJ_MAX_HOSTNAME);
+ ai[0].ai_addr.addr.sa_family = (pj_uint16_t)af;
+ *count = 1;
+
+ return PJ_SUCCESS;
+ }
+
+ if (af == PJ_AF_INET || af == PJ_AF_UNSPEC) {
+ pj_hostent he;
+ unsigned i, max_count;
+ pj_status_t status;
+
+ /* VC6 complains that "he" is uninitialized */
+ #ifdef _MSC_VER
+ pj_bzero(&he, sizeof(he));
+ #endif
+
+ status = pj_gethostbyname(nodename, &he);
+ if (status != PJ_SUCCESS)
+ return status;
+
+ max_count = *count;
+ *count = 0;
+
+ pj_bzero(ai, max_count * sizeof(pj_addrinfo));
+
+ for (i=0; he.h_addr_list[i] && *count<max_count; ++i) {
+ pj_ansi_strncpy(ai[*count].ai_canonname, he.h_name,
+ sizeof(ai[*count].ai_canonname));
+ ai[*count].ai_canonname[sizeof(ai[*count].ai_canonname)-1] = '\0';
+
+ ai[*count].ai_addr.ipv4.sin_family = PJ_AF_INET;
+ pj_memcpy(&ai[*count].ai_addr.ipv4.sin_addr,
+ he.h_addr_list[i], he.h_length);
+ PJ_SOCKADDR_RESET_LEN(&ai[*count].ai_addr);
+
+ (*count)++;
+ }
+
+ return PJ_SUCCESS;
+
+ } else {
+ /* IPv6 is not supported */
+ *count = 0;
+
+ return PJ_EIPV6NOTSUP;
+ }
+#endif /* PJ_SOCK_HAS_GETADDRINFO */
+}
+
diff --git a/jni/pjproject-android/.svn/pristine/a9/a9ecbe1c9f363baae9e4b3fd179300f3d19792ff.svn-base b/jni/pjproject-android/.svn/pristine/a9/a9ecbe1c9f363baae9e4b3fd179300f3d19792ff.svn-base
new file mode 100644
index 0000000..c4861aa
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a9/a9ecbe1c9f363baae9e4b3fd179300f3d19792ff.svn-base
@@ -0,0 +1,27 @@
+# $Id$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Some non-SIP URI's in Contact header
+#
+complete_msg = \
+"""INVITE sip:localhost SIP/2.0
+Via: SIP/2.0/UDP 192.168.0.14:5060;rport;branch=z9hG4bKPj9db9
+Max-Forwards: 70
+From: <sip:192.168.0.14>;tag=08cd5bfc2d8a4fddb1f5e59c6961d298
+To: <sip:localhost>
+Call-ID: 3373d9eb32aa458db7e69c7ea51e0bd7
+CSeq: 0 INVITE
+Contact: mailto:dontspam@pjsip.org
+Contact: <mailto:dontspam@pjsip.org>
+Contact: http://www.pjsip.org/the%20path.cgi?pname=pvalue
+Contact: <sip:localhost>
+User-Agent: PJSUA v0.9.0-trunk/win32
+Content-Length: 0
+"""
+
+
+sendto_cfg = sip.SendtoCfg( "Non SIP URI in Contact",
+ "--null-audio --auto-answer 200",
+ "", 200, complete_msg=complete_msg)
+
diff --git a/jni/pjproject-android/.svn/pristine/a9/a9ffa52c2d62990b327ea2f9efc49cae95b1756c.svn-base b/jni/pjproject-android/.svn/pristine/a9/a9ffa52c2d62990b327ea2f9efc49cae95b1756c.svn-base
new file mode 100644
index 0000000..36d8061
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a9/a9ffa52c2d62990b327ea2f9efc49cae95b1756c.svn-base
@@ -0,0 +1,16 @@
+DIRS = resample milenage srtp
+
+include ../../build.mak
+include $(PJDIR)/build/common.mak
+
+all clean dep depend distclean realclean:
+ for dir in $(DIRS); do \
+ if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ done
+
+doc:
+