* #36737: switch back to svn repo, remove assert in sip_transaction.c
diff --git a/jni/pjproject-android/.svn/pristine/7e/7e08814bb76149ac61826738fb7075893344cdba.svn-base b/jni/pjproject-android/.svn/pristine/7e/7e08814bb76149ac61826738fb7075893344cdba.svn-base
new file mode 100644
index 0000000..d0b5dd0
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7e08814bb76149ac61826738fb7075893344cdba.svn-base
@@ -0,0 +1,70 @@
+/* $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
+ */
+#ifndef __PJ_COMPAT_RAND_H__
+#define __PJ_COMPAT_RAND_H__
+
+/**
+ * @file rand.h
+ * @brief Provides platform_rand() and platform_srand() functions.
+ */
+
+#if defined(PJ_HAS_STDLIB_H) && PJ_HAS_STDLIB_H != 0
+ /*
+ * Use stdlib based rand() and srand().
+ */
+# include <stdlib.h>
+# define platform_srand srand
+# if defined(RAND_MAX) && RAND_MAX <= 0xFFFF
+ /*
+ * When rand() is only 16 bit strong, double the strength
+ * by calling it twice!
+ */
+ PJ_INLINE(int) platform_rand(void)
+ {
+ return ((rand() & 0xFFFF) << 16) | (rand() & 0xFFFF);
+ }
+# else
+# define platform_rand rand
+# endif
+
+#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0
+ /*
+ * Linux kernel mode random number generator.
+ */
+# include <linux/random.h>
+# define platform_srand(seed)
+
+ PJ_INLINE(int) platform_rand(void)
+ {
+ int value;
+ get_random_bytes((void*)&value, sizeof(value));
+ return value;
+ }
+
+#else
+# warning "platform_rand() is not implemented"
+# define platform_rand() 1
+# define platform_srand(seed)
+
+#endif
+
+
+#endif /* __PJ_COMPAT_RAND_H__ */
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7e0e8f2de064938a8db636f64190ca6a2867318c.svn-base b/jni/pjproject-android/.svn/pristine/7e/7e0e8f2de064938a8db636f64190ca6a2867318c.svn-base
new file mode 100644
index 0000000..2a2ec8b
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7e0e8f2de064938a8db636f64190ca6a2867318c.svn-base
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+
+<scenario name="Ticket #1148 (assertion when offering SDP media with port zero but answered with port non-zero)">
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 3 INVITE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+ s=-
+ c=IN IP[media_ip_type] [media_ip]
+ t=0 0
+ m=audio 4000 RTP/AVP 0
+ m=video 5000 RTP/AVP 100
+ a=rtpmap:100 H261/90000
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true">
+ </recv>
+ <recv response="180" optional="true">
+ </recv>
+ <recv response="200" rtd="true">
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 3 ACK
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- Waiting re-INVITE from pjsua -->
+
+ <recv request="INVITE" crlf="true">
+ </recv>
+
+ <send retrans="500">
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Content-Type: application/sdp
+
+ v=0
+ o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+ s=-
+ c=IN IP[media_ip_type] [media_ip]
+ t=0 0
+ m=audio 4000 RTP/AVP 0
+ m=video 5000 RTP/AVP 100
+ a=rtpmap:100 H261/90000
+
+ ]]>
+ </send>
+
+ <!-- Expecting assertion here -->
+
+ <recv request="ACK" crlf="true">
+ </recv>
+
+ <!-- definition of the response time repartition table (unit is ms) -->
+ <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+ <!-- definition of the call length repartition table (unit is ms) -->
+ <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7e2f1c8aeb85eb8e8561f039861afd8152fd646e.svn-base b/jni/pjproject-android/.svn/pristine/7e/7e2f1c8aeb85eb8e8561f039861afd8152fd646e.svn-base
new file mode 100644
index 0000000..e51f292
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7e2f1c8aeb85eb8e8561f039861afd8152fd646e.svn-base
@@ -0,0 +1,68 @@
+/* $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/assert.h>
+#include <pj/string.h>
+
+#if PJ_SAFE_POOL
+# define SIG_SIZE sizeof(pj_uint32_t)
+
+static void apply_signature(void *p, pj_size_t size);
+static void check_pool_signature(void *p, pj_size_t size);
+
+# define APPLY_SIG(p,sz) apply_signature(p,sz), \
+ p=(void*)(((char*)p)+SIG_SIZE)
+# define REMOVE_SIG(p,sz) check_pool_signature(p,sz), \
+ p=(void*)(((char*)p)-SIG_SIZE)
+
+# define SIG_BEGIN 0x600DC0DE
+# define SIG_END 0x0BADC0DE
+
+static void apply_signature(void *p, pj_size_t size)
+{
+ pj_uint32_t sig;
+
+ sig = SIG_BEGIN;
+ pj_memcpy(p, &sig, SIG_SIZE);
+
+ sig = SIG_END;
+ pj_memcpy(((char*)p)+SIG_SIZE+size, &sig, SIG_SIZE);
+}
+
+static void check_pool_signature(void *p, pj_size_t size)
+{
+ pj_uint32_t sig;
+ pj_uint8_t *mem = (pj_uint8_t*)p;
+
+ /* Check that signature at the start of the block is still intact */
+ sig = SIG_BEGIN;
+ pj_assert(!pj_memcmp(mem-SIG_SIZE, &sig, SIG_SIZE));
+
+ /* Check that signature at the end of the block is still intact.
+ * Note that "mem" has been incremented by SIG_SIZE
+ */
+ sig = SIG_END;
+ pj_assert(!pj_memcmp(mem+size, &sig, SIG_SIZE));
+}
+
+#else
+# define SIG_SIZE 0
+# define APPLY_SIG(p,sz)
+# define REMOVE_SIG(p,sz)
+#endif
diff --git a/jni/pjproject-android/.svn/pristine/7e/7e40fd270ceff6b11d29d54024fe380c44a25465.svn-base b/jni/pjproject-android/.svn/pristine/7e/7e40fd270ceff6b11d29d54024fe380c44a25465.svn-base
new file mode 100644
index 0000000..79cd75b
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7e40fd270ceff6b11d29d54024fe380c44a25465.svn-base
@@ -0,0 +1,231 @@
+/* $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
+ */
+
+
+/*
+ * DO NOT COMPILE THIS FILE ON ITS OWN!
+ *
+ * This file is included by siprtp.c to implement the reporting capability
+ * to a separate file, so that user can implement different reporting
+ * functionality (such as writing to XML file).
+ */
+
+
+static void print_call(int call_index)
+{
+ struct call *call = &app.call[call_index];
+ int len;
+ pjsip_inv_session *inv = call->inv;
+ pjsip_dialog *dlg = inv->dlg;
+ struct media_stream *audio = &call->media[0];
+ char userinfo[128];
+ char duration[80], last_update[80];
+ char bps[16], ipbps[16], packets[16], bytes[16], ipbytes[16];
+ unsigned decor;
+ pj_time_val now;
+
+
+ decor = pj_log_get_decor();
+ pj_log_set_decor(PJ_LOG_HAS_NEWLINE);
+
+ pj_gettimeofday(&now);
+
+ if (app.report_filename)
+ puts(app.report_filename);
+
+ /* Print duration */
+ if (inv->state >= PJSIP_INV_STATE_CONFIRMED && call->connect_time.sec) {
+
+ PJ_TIME_VAL_SUB(now, call->connect_time);
+
+ sprintf(duration, " [duration: %02ld:%02ld:%02ld.%03ld]",
+ now.sec / 3600,
+ (now.sec % 3600) / 60,
+ (now.sec % 60),
+ now.msec);
+
+ } else {
+ duration[0] = '\0';
+ }
+
+
+
+ /* Call number and state */
+ PJ_LOG(3, (THIS_FILE,
+ "Call #%d: %s%s",
+ call_index, pjsip_inv_state_name(inv->state),
+ duration));
+
+
+
+ /* Call identification */
+ len = pjsip_hdr_print_on(dlg->remote.info, userinfo, sizeof(userinfo));
+ if (len < 0)
+ pj_ansi_strcpy(userinfo, "<--uri too long-->");
+ else
+ userinfo[len] = '\0';
+
+ PJ_LOG(3, (THIS_FILE, " %s", userinfo));
+
+
+ if (call->inv == NULL || call->inv->state < PJSIP_INV_STATE_CONFIRMED ||
+ call->connect_time.sec == 0)
+ {
+ pj_log_set_decor(decor);
+ return;
+ }
+
+
+ /* Signaling quality */
+ {
+ char pdd[64], connectdelay[64];
+ pj_time_val t;
+
+ if (call->response_time.sec) {
+ t = call->response_time;
+ PJ_TIME_VAL_SUB(t, call->start_time);
+ sprintf(pdd, "got 1st response in %ld ms", PJ_TIME_VAL_MSEC(t));
+ } else {
+ pdd[0] = '\0';
+ }
+
+ if (call->connect_time.sec) {
+ t = call->connect_time;
+ PJ_TIME_VAL_SUB(t, call->start_time);
+ sprintf(connectdelay, ", connected after: %ld ms",
+ PJ_TIME_VAL_MSEC(t));
+ } else {
+ connectdelay[0] = '\0';
+ }
+
+ PJ_LOG(3, (THIS_FILE,
+ " Signaling quality: %s%s", pdd, connectdelay));
+ }
+
+
+ PJ_LOG(3, (THIS_FILE,
+ " Stream #0: audio %.*s@%dHz, %dms/frame, %sB/s (%sB/s +IP hdr)",
+ (int)audio->si.fmt.encoding_name.slen,
+ audio->si.fmt.encoding_name.ptr,
+ audio->clock_rate,
+ audio->samples_per_frame * 1000 / audio->clock_rate,
+ good_number(bps, audio->bytes_per_frame * audio->clock_rate / audio->samples_per_frame),
+ good_number(ipbps, (audio->bytes_per_frame+32) * audio->clock_rate / audio->samples_per_frame)));
+
+ if (audio->rtcp.stat.rx.update_cnt == 0)
+ strcpy(last_update, "never");
+ else {
+ pj_gettimeofday(&now);
+ PJ_TIME_VAL_SUB(now, audio->rtcp.stat.rx.update);
+ sprintf(last_update, "%02ldh:%02ldm:%02ld.%03lds ago",
+ now.sec / 3600,
+ (now.sec % 3600) / 60,
+ now.sec % 60,
+ now.msec);
+ }
+
+ PJ_LOG(3, (THIS_FILE,
+ " RX stat last update: %s\n"
+ " total %s packets %sB received (%sB +IP hdr)%s\n"
+ " pkt loss=%d (%3.1f%%), dup=%d (%3.1f%%), reorder=%d (%3.1f%%)%s\n"
+ " (msec) min avg max last\n"
+ " loss period: %7.3f %7.3f %7.3f %7.3f%s\n"
+ " jitter : %7.3f %7.3f %7.3f %7.3f%s",
+ last_update,
+ good_number(packets, audio->rtcp.stat.rx.pkt),
+ good_number(bytes, audio->rtcp.stat.rx.bytes),
+ good_number(ipbytes, audio->rtcp.stat.rx.bytes + audio->rtcp.stat.rx.pkt * 32),
+ "",
+ audio->rtcp.stat.rx.loss,
+ audio->rtcp.stat.rx.loss * 100.0 / (audio->rtcp.stat.rx.pkt + audio->rtcp.stat.rx.loss),
+ audio->rtcp.stat.rx.dup,
+ audio->rtcp.stat.rx.dup * 100.0 / (audio->rtcp.stat.rx.pkt + audio->rtcp.stat.rx.loss),
+ audio->rtcp.stat.rx.reorder,
+ audio->rtcp.stat.rx.reorder * 100.0 / (audio->rtcp.stat.rx.pkt + audio->rtcp.stat.rx.loss),
+ "",
+ audio->rtcp.stat.rx.loss_period.min / 1000.0,
+ audio->rtcp.stat.rx.loss_period.mean / 1000.0,
+ audio->rtcp.stat.rx.loss_period.max / 1000.0,
+ audio->rtcp.stat.rx.loss_period.last / 1000.0,
+ "",
+ audio->rtcp.stat.rx.jitter.min / 1000.0,
+ audio->rtcp.stat.rx.jitter.mean / 1000.0,
+ audio->rtcp.stat.rx.jitter.max / 1000.0,
+ audio->rtcp.stat.rx.jitter.last / 1000.0,
+ ""
+ ));
+
+
+ if (audio->rtcp.stat.tx.update_cnt == 0)
+ strcpy(last_update, "never");
+ else {
+ pj_gettimeofday(&now);
+ PJ_TIME_VAL_SUB(now, audio->rtcp.stat.tx.update);
+ sprintf(last_update, "%02ldh:%02ldm:%02ld.%03lds ago",
+ now.sec / 3600,
+ (now.sec % 3600) / 60,
+ now.sec % 60,
+ now.msec);
+ }
+
+ PJ_LOG(3, (THIS_FILE,
+ " TX stat last update: %s\n"
+ " total %s packets %sB sent (%sB +IP hdr)%s\n"
+ " pkt loss=%d (%3.1f%%), dup=%d (%3.1f%%), reorder=%d (%3.1f%%)%s\n"
+ " (msec) min avg max last\n"
+ " loss period: %7.3f %7.3f %7.3f %7.3f%s\n"
+ " jitter : %7.3f %7.3f %7.3f %7.3f%s",
+ last_update,
+ good_number(packets, audio->rtcp.stat.tx.pkt),
+ good_number(bytes, audio->rtcp.stat.tx.bytes),
+ good_number(ipbytes, audio->rtcp.stat.tx.bytes + audio->rtcp.stat.tx.pkt * 32),
+ "",
+ audio->rtcp.stat.tx.loss,
+ audio->rtcp.stat.tx.loss * 100.0 / (audio->rtcp.stat.tx.pkt + audio->rtcp.stat.tx.loss),
+ audio->rtcp.stat.tx.dup,
+ audio->rtcp.stat.tx.dup * 100.0 / (audio->rtcp.stat.tx.pkt + audio->rtcp.stat.tx.loss),
+ audio->rtcp.stat.tx.reorder,
+ audio->rtcp.stat.tx.reorder * 100.0 / (audio->rtcp.stat.tx.pkt + audio->rtcp.stat.tx.loss),
+ "",
+ audio->rtcp.stat.tx.loss_period.min / 1000.0,
+ audio->rtcp.stat.tx.loss_period.mean / 1000.0,
+ audio->rtcp.stat.tx.loss_period.max / 1000.0,
+ audio->rtcp.stat.tx.loss_period.last / 1000.0,
+ "",
+ audio->rtcp.stat.tx.jitter.min / 1000.0,
+ audio->rtcp.stat.tx.jitter.mean / 1000.0,
+ audio->rtcp.stat.tx.jitter.max / 1000.0,
+ audio->rtcp.stat.tx.jitter.last / 1000.0,
+ ""
+ ));
+
+
+ PJ_LOG(3, (THIS_FILE,
+ " RTT delay : %7.3f %7.3f %7.3f %7.3f%s\n",
+ audio->rtcp.stat.rtt.min / 1000.0,
+ audio->rtcp.stat.rtt.mean / 1000.0,
+ audio->rtcp.stat.rtt.max / 1000.0,
+ audio->rtcp.stat.rtt.last / 1000.0,
+ ""
+ ));
+
+ pj_log_set_decor(decor);
+}
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7e444bf5a89864f74b7630174599e9743d79127a.svn-base b/jni/pjproject-android/.svn/pristine/7e/7e444bf5a89864f74b7630174599e9743d79127a.svn-base
new file mode 100644
index 0000000..20e93d6
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7e444bf5a89864f74b7630174599e9743d79127a.svn-base
@@ -0,0 +1,272 @@
+/* $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
+ */
+#ifndef __PJMEDIA_TYPES_H__
+#define __PJMEDIA_TYPES_H__
+
+/**
+ * @file pjmedia/types.h Basic Types
+ * @brief Basic PJMEDIA types.
+ */
+
+#include <pjmedia/config.h>
+#include <pj/sock.h>
+#include <pj/types.h>
+
+
+/**
+ * @defgroup PJMEDIA_PORT Media Ports Framework
+ * @brief Extensible framework for media terminations
+ */
+
+
+/**
+ * @defgroup PJMEDIA_FRAME_OP Audio Manipulation Algorithms
+ * @brief Algorithms to manipulate audio frames
+ */
+
+/**
+ * @defgroup PJMEDIA_TYPES Basic Types
+ * @ingroup PJMEDIA_BASE
+ * @brief Basic PJMEDIA types and operations.
+ * @{
+ */
+
+/**
+ * Top most media type. See also #pjmedia_type_name().
+ */
+typedef enum pjmedia_type
+{
+ /** Type is not specified. */
+ PJMEDIA_TYPE_NONE,
+
+ /** The media is audio */
+ PJMEDIA_TYPE_AUDIO,
+
+ /** The media is video. */
+ PJMEDIA_TYPE_VIDEO,
+
+ /** The media is application. */
+ PJMEDIA_TYPE_APPLICATION,
+
+ /** The media type is unknown or unsupported. */
+ PJMEDIA_TYPE_UNKNOWN
+
+} pjmedia_type;
+
+
+/**
+ * Media transport protocol.
+ */
+typedef enum pjmedia_tp_proto
+{
+ /** No transport type */
+ PJMEDIA_TP_PROTO_NONE = 0,
+
+ /** RTP using A/V profile */
+ PJMEDIA_TP_PROTO_RTP_AVP,
+
+ /** Secure RTP */
+ PJMEDIA_TP_PROTO_RTP_SAVP,
+
+ /** Unknown */
+ PJMEDIA_TP_PROTO_UNKNOWN
+
+} pjmedia_tp_proto;
+
+
+/**
+ * Media direction.
+ */
+typedef enum pjmedia_dir
+{
+ /** None */
+ PJMEDIA_DIR_NONE = 0,
+
+ /** Encoding (outgoing to network) stream, also known as capture */
+ PJMEDIA_DIR_ENCODING = 1,
+
+ /** Same as encoding direction. */
+ PJMEDIA_DIR_CAPTURE = PJMEDIA_DIR_ENCODING,
+
+ /** Decoding (incoming from network) stream, also known as playback. */
+ PJMEDIA_DIR_DECODING = 2,
+
+ /** Same as decoding. */
+ PJMEDIA_DIR_PLAYBACK = PJMEDIA_DIR_DECODING,
+
+ /** Same as decoding. */
+ PJMEDIA_DIR_RENDER = PJMEDIA_DIR_DECODING,
+
+ /** Incoming and outgoing stream, same as PJMEDIA_DIR_CAPTURE_PLAYBACK */
+ PJMEDIA_DIR_ENCODING_DECODING = 3,
+
+ /** Same as ENCODING_DECODING */
+ PJMEDIA_DIR_CAPTURE_PLAYBACK = PJMEDIA_DIR_ENCODING_DECODING,
+
+ /** Same as ENCODING_DECODING */
+ PJMEDIA_DIR_CAPTURE_RENDER = PJMEDIA_DIR_ENCODING_DECODING
+
+} pjmedia_dir;
+
+
+/**
+ * Opaque declaration of media endpoint.
+ */
+typedef struct pjmedia_endpt pjmedia_endpt;
+
+/*
+ * Forward declaration for stream (needed by transport).
+ */
+typedef struct pjmedia_stream pjmedia_stream;
+
+/**
+ * Enumeration for picture coordinate base.
+ */
+typedef enum pjmedia_coord_base
+{
+ /**
+ * This specifies that the pixel [0, 0] location is at the left-top
+ * position.
+ */
+ PJMEDIA_COORD_BASE_LEFT_TOP,
+
+ /**
+ * This specifies that the pixel [0, 0] location is at the left-bottom
+ * position.
+ */
+ PJMEDIA_COORD_BASE_LEFT_BOTTOM
+
+} pjmedia_coord_base;
+
+/**
+ * This structure is used to represent rational numbers.
+ */
+typedef struct pjmedia_ratio
+{
+ int num; /** < Numerator. */
+ int denum; /** < Denumerator. */
+} pjmedia_ratio;
+
+/**
+ * This structure represent a coordinate.
+ */
+typedef struct pjmedia_coord
+{
+ int x; /**< X position of the coordinate */
+ int y; /**< Y position of the coordinate */
+} pjmedia_coord;
+
+/**
+ * This structure represents rectangle size.
+ */
+typedef struct pjmedia_rect_size
+{
+ unsigned w; /**< The width. */
+ unsigned h; /**< The height. */
+} pjmedia_rect_size;
+
+/**
+ * This structure describes a rectangle.
+ */
+typedef struct pjmedia_rect
+{
+ pjmedia_coord coord; /**< The position. */
+ pjmedia_rect_size size; /**< The size. */
+} pjmedia_rect;
+
+/**
+ * Enumeration for video/picture orientation.
+ */
+typedef enum pjmedia_orient
+{
+ /**
+ * Unknown orientation.
+ */
+ PJMEDIA_ORIENT_UNKNOWN,
+
+ /**
+ * Natural orientation, e.g: sky upside on landscape view, head upside
+ * on human portrait.
+ */
+ PJMEDIA_ORIENT_NATURAL,
+
+ /**
+ * Specifies that the video/picture needs to be rotated 90 degrees
+ * clockwise to be displayed in natural orientation.
+ */
+ PJMEDIA_ORIENT_ROTATE_90DEG,
+
+ /**
+ * Specifies that the video/picture needs to be rotated 180 degrees
+ * clockwise to be displayed in natural orientation.
+ */
+ PJMEDIA_ORIENT_ROTATE_180DEG,
+
+ /**
+ * Specifies that the video/picture needs to be rotated 270 degrees
+ * clockwise to be displayed in natural orientation.
+ */
+ PJMEDIA_ORIENT_ROTATE_270DEG
+
+} pjmedia_orient;
+
+
+/**
+ * Macro for packing format from a four character code, similar to FOURCC.
+ */
+#define PJMEDIA_FOURCC(C1, C2, C3, C4) ( C4<<24 | C3<<16 | C2<<8 | C1 )
+
+
+/**
+ * Utility function to return the string name for a pjmedia_type.
+ *
+ * @param t The media type.
+ *
+ * @return String.
+ */
+PJ_DECL(const char*) pjmedia_type_name(pjmedia_type t);
+
+/**
+ * A utility function to convert fourcc type of value to four letters string.
+ *
+ * @param sig The fourcc value.
+ * @param buf Buffer to store the string, which MUST be at least
+ * five bytes long.
+ *
+ * @return The string.
+ */
+PJ_INLINE(const char*) pjmedia_fourcc_name(pj_uint32_t sig, char buf[])
+{
+ buf[3] = (char)((sig >> 24) & 0xFF);
+ buf[2] = (char)((sig >> 16) & 0xFF);
+ buf[1] = (char)((sig >> 8) & 0xFF);
+ buf[0] = (char)((sig >> 0) & 0xFF);
+ buf[4] = '\0';
+ return buf;
+}
+
+
+/**
+ * @}
+ */
+
+
+#endif /* __PJMEDIA_TYPES_H__ */
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7e45295eb277dc11f825855c53292ceb0e74f2a6.svn-base b/jni/pjproject-android/.svn/pristine/7e/7e45295eb277dc11f825855c53292ceb0e74f2a6.svn-base
new file mode 100644
index 0000000..30b633a
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7e45295eb277dc11f825855c53292ceb0e74f2a6.svn-base
@@ -0,0 +1,109 @@
+/* $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
+ */
+#ifndef __PJ_FILE_ACCESS_H__
+#define __PJ_FILE_ACCESS_H__
+
+/**
+ * @file file_access.h
+ * @brief File manipulation and access.
+ */
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_FILE_ACCESS File Access
+ * @ingroup PJ_IO
+ * @{
+ *
+ */
+
+/**
+ * This structure describes file information, to be obtained by
+ * calling #pj_file_getstat(). The time information in this structure
+ * is in local time.
+ */
+typedef struct pj_file_stat
+{
+ pj_off_t size; /**< Total file size. */
+ pj_time_val atime; /**< Time of last access. */
+ pj_time_val mtime; /**< Time of last modification. */
+ pj_time_val ctime; /**< Time of last creation. */
+} pj_file_stat;
+
+
+/**
+ * Returns non-zero if the specified file exists.
+ *
+ * @param filename The file name.
+ *
+ * @return Non-zero if the file exists.
+ */
+PJ_DECL(pj_bool_t) pj_file_exists(const char *filename);
+
+/**
+ * Returns the size of the file.
+ *
+ * @param filename The file name.
+ *
+ * @return The file size in bytes or -1 on error.
+ */
+PJ_DECL(pj_off_t) pj_file_size(const char *filename);
+
+/**
+ * Delete a file.
+ *
+ * @param filename The filename.
+ *
+ * @return PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_file_delete(const char *filename);
+
+/**
+ * Move a \c oldname to \c newname. If \c newname already exists,
+ * it will be overwritten.
+ *
+ * @param oldname The file to rename.
+ * @param newname New filename to assign.
+ *
+ * @return PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_file_move( const char *oldname,
+ const char *newname);
+
+
+/**
+ * Return information about the specified file. The time information in
+ * the \c stat structure will be in local time.
+ *
+ * @param filename The filename.
+ * @param stat Pointer to variable to receive file information.
+ *
+ * @return PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_file_getstat(const char *filename, pj_file_stat *stat);
+
+
+/** @} */
+
+PJ_END_DECL
+
+
+#endif /* __PJ_FILE_ACCESS_H__ */
diff --git a/jni/pjproject-android/.svn/pristine/7e/7e77cd8232cf1852c03860d1aac3c345334580ac.svn-base b/jni/pjproject-android/.svn/pristine/7e/7e77cd8232cf1852c03860d1aac3c345334580ac.svn-base
new file mode 100644
index 0000000..c194ba9
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7e77cd8232cf1852c03860d1aac3c345334580ac.svn-base
@@ -0,0 +1,29 @@
+# $Id$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Multiple good m=audio lines! The current algorithm in pjsua-lib will
+# select the first audio (note that in 1.x it will select the last audio)
+sdp = \
+"""
+v=0
+o=- 0 0 IN IP4 127.0.0.1
+s=-
+c=IN IP4 127.0.0.1
+t=0 0
+m=audio 5000 RTP/AVP 0
+m=audio 4000 RTP/AVP 0
+m=audio 3000 RTP/AVP 0
+"""
+
+pjsua_args = "--null-audio --auto-answer 200"
+extra_headers = ""
+include = ["Content-Type: application/sdp", # response must include SDP
+ "m=audio [1-9]+[0-9]* RTP/AVP[\\s\\S]+m=audio 0 RTP/AVP[\\s\\S]+m=audio 0 RTP/AVP"
+ ]
+exclude = []
+
+sendto_cfg = sip.SendtoCfg("Mutiple good m=audio lines", pjsua_args, sdp, 200,
+ extra_headers=extra_headers,
+ resp_inc=include, resp_exc=exclude)
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7e889af43e5ac211cdda84789c4edee564d63402.svn-base b/jni/pjproject-android/.svn/pristine/7e/7e889af43e5ac211cdda84789c4edee564d63402.svn-base
new file mode 100644
index 0000000..cf8bf48
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7e889af43e5ac211cdda84789c4edee564d63402.svn-base
@@ -0,0 +1,25 @@
+# $Id$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Too long key should be rejected
+sdp = \
+"""
+v=0
+o=- 0 0 IN IP4 127.0.0.1
+s=-
+c=IN IP4 127.0.0.1
+t=0 0
+m=audio 5000 RTP/SAVP 0
+a=crypto:1 aes_cm_128_hmac_sha1_80 inline:WnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQWnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQ
+"""
+
+pjsua_args = "--null-audio --auto-answer 200 --use-srtp 2 --srtp-secure 0"
+extra_headers = ""
+include = []
+exclude = []
+
+sendto_cfg = sip.SendtoCfg("SRTP receive too long key", pjsua_args, sdp, 406,
+ extra_headers=extra_headers,
+ resp_inc=include, resp_exc=exclude)
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7ea1910ec4700d77b8220706c73a46fde409f169.svn-base b/jni/pjproject-android/.svn/pristine/7e/7ea1910ec4700d77b8220706c73a46fde409f169.svn-base
new file mode 100644
index 0000000..ee06884
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7ea1910ec4700d77b8220706c73a46fde409f169.svn-base
@@ -0,0 +1,173 @@
+import sys
+import os
+
+REMOVE_THESE = ["-I/usr/include", "-I/usr/include/", "-L/usr/lib", "-L/usr/lib/"]
+
+class Pkg:
+ def __init__(self, pkg_name):
+ self.name = pkg_name
+ self.priority = 0
+ self.vars = {}
+
+ def parse(self, pkg_config_path):
+ f = None
+ for pkg_path in pkg_config_path.split(':'):
+ if pkg_path[-1] != '/':
+ pkg_path += '/'
+ fname = pkg_path + self.name + '.pc'
+ try:
+ f = open(fname, "r")
+ break
+ except:
+ continue
+ if not f:
+ #sys.stderr.write("pkgconfig.py: unable to find %s.pc in %s\n" % (self.name, pkg_config_path))
+ return False
+
+ for line in f.readlines():
+ line = line.strip()
+ if not line:
+ continue
+ if line[0]=='#':
+ continue
+ pos1 = line.find('=')
+ pos2 = line.find(':')
+ if pos1 > 0 and (pos1 < pos2 or pos2 < 0):
+ pos = pos1
+ elif pos2 > 0 and (pos2 < pos1 or pos1 < 0):
+ pos = pos2
+ else:
+ continue
+ name = line[:pos].lower()
+ value = line[pos+1:]
+ self.vars[name] = value
+ f.close()
+
+ for name in self.vars.keys():
+ value = self.vars[name]
+ while True:
+ pos1 = value.find("${")
+ if pos1 < 0:
+ break
+ pos2 = value.find("}")
+ if pos2 < 0:
+ break
+ value = value.replace(value[pos1:pos2+1], self.vars[value[pos1+2:pos2]])
+ self.vars[name] = value
+ return True
+
+ def requires(self):
+ if not 'requires' in self.vars:
+ return []
+ deps = []
+ req_list = self.vars['requires']
+ for req_item in req_list.split(','):
+ req_item = req_item.strip()
+ for i in range(len(req_item)):
+ if "=<>".find(req_item[i]) >= 0:
+ deps.append(req_item[:i].strip())
+ break
+ return deps
+
+ def libs(self):
+ if not 'libs' in self.vars:
+ return []
+ return self.vars['libs'].split(' ')
+
+ def cflags(self):
+ if not 'cflags' in self.vars:
+ return []
+ return self.vars['cflags'].split(' ')
+
+
+def calculate_pkg_priority(pkg, pkg_dict, loop_cnt):
+ if loop_cnt > 10:
+ sys.stderr.write("Circular dependency with pkg %s\n" % (pkg))
+ return 0
+ reqs = pkg.requires()
+ prio = 1
+ for req in reqs:
+ if not req in pkg_dict:
+ continue
+ req_pkg = pkg_dict[req]
+ prio += calculate_pkg_priority(req_pkg, pkg_dict, loop_cnt+1)
+ return prio
+
+if __name__ == "__main__":
+ pkg_names = []
+ pkg_dict = {}
+ commands = []
+ exist_check = False
+
+ for i in range(1,len(sys.argv)):
+ if sys.argv[i][0] == '-':
+ cmd = sys.argv[i]
+ commands.append(cmd)
+ if cmd=='--exists':
+ exist_check = True
+ elif cmd=="--help":
+ print "This is not very helpful, is it"
+ sys.exit(0)
+ elif cmd=="--version":
+ print "0.1"
+ sys.exit(0)
+ else:
+ pkg_names.append(sys.argv[i])
+
+ # Fix search path
+ PKG_CONFIG_PATH = os.getenv("PKG_CONFIG_PATH", "").strip()
+ if not PKG_CONFIG_PATH:
+ PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
+ PKG_CONFIG_PATH = PKG_CONFIG_PATH.replace(";", ":")
+
+ # Parse files
+ for pkg_name in pkg_names:
+ pkg = Pkg(pkg_name)
+ if not pkg.parse(PKG_CONFIG_PATH):
+ sys.exit(1)
+ pkg_dict[pkg_name] = pkg
+
+ if exist_check:
+ sys.exit(0)
+
+ # Calculate priority based on dependency
+ for pkg_name in pkg_dict.keys():
+ pkg = pkg_dict[pkg_name]
+ pkg.priority = calculate_pkg_priority(pkg, pkg_dict, 1)
+
+ # Sort package based on dependency
+ pkg_names = sorted(pkg_names, key=lambda pkg_name: pkg_dict[pkg_name].priority, reverse=True)
+
+ # Get the options
+ opts = []
+ for cmd in commands:
+ if cmd=='--libs':
+ for pkg_name in pkg_names:
+ libs = pkg_dict[pkg_name].libs()
+ for lib in libs:
+ opts.append(lib)
+ if lib[:2]=="-l":
+ break
+ for pkg_name in pkg_names:
+ opts += pkg_dict[pkg_name].libs()
+ elif cmd=='--cflags':
+ for pkg_name in pkg_names:
+ opts += pkg_dict[pkg_name].cflags()
+ elif cmd[0]=='-':
+ sys.stderr.write("pkgconfig.py: I don't know how to handle " + sys.argv[i] + "\n")
+
+ filtered_opts = []
+ for opt in opts:
+ opt = opt.strip()
+ if not opt:
+ continue
+ if REMOVE_THESE.count(opt) != 0:
+ continue
+ if opt != '-framework' and opt != '--framework' and filtered_opts.count(opt) != 0:
+ if len(filtered_opts) and (filtered_opts[-1] == '-framework' or filtered_opts[-1] == '--framework'):
+ filtered_opts.pop()
+ continue
+ filtered_opts.append(opt)
+
+ print ' '.join(filtered_opts)
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7eaf39e1c1a8ae09837d4c8a15ede6533aa20e2b.svn-base b/jni/pjproject-android/.svn/pristine/7e/7eaf39e1c1a8ae09837d4c8a15ede6533aa20e2b.svn-base
new file mode 100644
index 0000000..3da1440
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7eaf39e1c1a8ae09837d4c8a15ede6533aa20e2b.svn-base
@@ -0,0 +1,27 @@
+# $Id$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# The unknown media uses static payload type
+sdp = \
+"""
+v=0
+o=- 0 0 IN IP4 127.0.0.1
+s=-
+c=IN IP4 127.0.0.1
+t=0 0
+m=audio 5000 RTP/AVP 0
+m=xapplicationx 4000 RTP/AVP 54
+"""
+
+pjsua_args = "--null-audio --auto-answer 200"
+extra_headers = ""
+include = ["Content-Type: application/sdp", # response must include SDP
+ "m=audio [1-9]+[0-9]* RTP/AVP[\\s\\S]+m=xapplicationx 0 RTP/AVP"
+ ]
+exclude = []
+
+sendto_cfg = sip.SendtoCfg("Mixed audio and unknown", pjsua_args, sdp, 200,
+ extra_headers=extra_headers,
+ resp_inc=include, resp_exc=exclude)
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7ebe0215e247cdc0f8c10818edf475d6d87872a9.svn-base b/jni/pjproject-android/.svn/pristine/7e/7ebe0215e247cdc0f8c10818edf475d6d87872a9.svn-base
new file mode 100644
index 0000000..613d7fe
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7ebe0215e247cdc0f8c10818edf475d6d87872a9.svn-base
@@ -0,0 +1,42 @@
+/* longjmp for i386.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define _ASM
+#define _SETJMP_H
+#define PJ_LINUX_KERNEL 1
+#include <pj/compat/setjmp.h>
+
+.global __longjmp
+.type __longjmp,%function
+.align 4
+__longjmp:
+ movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */
+ movl 8(%esp), %eax /* Second argument is return value. */
+ /* Save the return address now. */
+ movl (JB_PC*4)(%ecx), %edx
+ /* Restore registers. */
+ movl (JB_BX*4)(%ecx), %ebx
+ movl (JB_SI*4)(%ecx), %esi
+ movl (JB_DI*4)(%ecx), %edi
+ movl (JB_BP*4)(%ecx), %ebp
+ movl (JB_SP*4)(%ecx), %esp
+ /* Jump to saved PC. */
+ jmp *%edx
+.size __longjmp,.-__longjmp
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7ecb63bed31a6c336773042d6fdc525f1bcd7891.svn-base b/jni/pjproject-android/.svn/pristine/7e/7ecb63bed31a6c336773042d6fdc525f1bcd7891.svn-base
new file mode 100644
index 0000000..514ff24
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7ecb63bed31a6c336773042d6fdc525f1bcd7891.svn-base
@@ -0,0 +1,328 @@
+/* $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/os.h>
+#include <pj/ctype.h>
+#include <pj/errno.h>
+#include <pj/string.h>
+
+/*
+ * FYI these links contain useful infos about predefined macros across
+ * platforms:
+ * - http://predef.sourceforge.net/preos.html
+ */
+
+#if defined(PJ_HAS_SYS_UTSNAME_H) && PJ_HAS_SYS_UTSNAME_H != 0
+/* For uname() */
+# include <sys/utsname.h>
+# include <stdlib.h>
+# define PJ_HAS_UNAME 1
+#endif
+
+#if defined(PJ_HAS_LIMITS_H) && PJ_HAS_LIMITS_H != 0
+/* Include <limits.h> to get <features.h> to get various glibc macros.
+ * See http://predef.sourceforge.net/prelib.html
+ */
+# include <limits.h>
+#endif
+
+#if defined(_MSC_VER)
+/* For all Windows including mobile */
+# include <windows.h>
+#endif
+
+#if defined(PJ_DARWINOS) && PJ_DARWINOS != 0
+# include "TargetConditionals.h"
+#endif
+
+#ifndef PJ_SYS_INFO_BUFFER_SIZE
+# define PJ_SYS_INFO_BUFFER_SIZE 64
+#endif
+
+
+#if defined(PJ_DARWINOS) && PJ_DARWINOS != 0 && TARGET_OS_IPHONE
+# include <sys/types.h>
+# include <sys/sysctl.h>
+ void pj_iphone_os_get_sys_info(pj_sys_info *si, pj_str_t *si_buffer);
+#endif
+
+#if defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0
+ PJ_BEGIN_DECL
+ unsigned pj_symbianos_get_model_info(char *buf, unsigned buf_size);
+ unsigned pj_symbianos_get_platform_info(char *buf, unsigned buf_size);
+ void pj_symbianos_get_sdk_info(pj_str_t *name, pj_uint32_t *ver);
+ PJ_END_DECL
+#endif
+
+
+static char *ver_info(pj_uint32_t ver, char *buf)
+{
+ pj_size_t len;
+
+ if (ver == 0) {
+ *buf = '\0';
+ return buf;
+ }
+
+ sprintf(buf, "-%u.%u",
+ (ver & 0xFF000000) >> 24,
+ (ver & 0x00FF0000) >> 16);
+ len = strlen(buf);
+
+ if (ver & 0xFFFF) {
+ sprintf(buf+len, ".%u", (ver & 0xFF00) >> 8);
+ len = strlen(buf);
+
+ if (ver & 0x00FF) {
+ sprintf(buf+len, ".%u", (ver & 0xFF));
+ }
+ }
+
+ return buf;
+}
+
+static pj_uint32_t parse_version(char *str)
+{
+ char *tok;
+ int i, maxtok;
+ pj_uint32_t version = 0;
+
+ while (*str && !pj_isdigit(*str))
+ str++;
+
+ maxtok = 4;
+ for (tok = strtok(str, ".-"), i=0; tok && i<maxtok;
+ ++i, tok=strtok(NULL, ".-"))
+ {
+ int n;
+
+ if (!pj_isdigit(*tok))
+ break;
+
+ n = atoi(tok);
+ version |= (n << ((3-i)*8));
+ }
+
+ return version;
+}
+
+PJ_DEF(const pj_sys_info*) pj_get_sys_info(void)
+{
+ static char si_buffer[PJ_SYS_INFO_BUFFER_SIZE];
+ static pj_sys_info si;
+ static pj_bool_t si_initialized;
+ pj_size_t left = PJ_SYS_INFO_BUFFER_SIZE, len;
+
+ if (si_initialized)
+ return &si;
+
+ si.machine.ptr = si.os_name.ptr = si.sdk_name.ptr = si.info.ptr = "";
+
+#define ALLOC_CP_STR(str,field) \
+ do { \
+ len = pj_ansi_strlen(str); \
+ if (len && left >= len+1) { \
+ si.field.ptr = si_buffer + PJ_SYS_INFO_BUFFER_SIZE - left; \
+ si.field.slen = len; \
+ pj_memcpy(si.field.ptr, str, len+1); \
+ left -= (len+1); \
+ } \
+ } while (0)
+
+ /*
+ * Machine and OS info.
+ */
+#if defined(PJ_HAS_UNAME) && PJ_HAS_UNAME
+ #if defined(PJ_DARWINOS) && PJ_DARWINOS != 0 && TARGET_OS_IPHONE && \
+ (!defined TARGET_IPHONE_SIMULATOR || TARGET_IPHONE_SIMULATOR == 0)
+ {
+ pj_str_t buf = {si_buffer + PJ_SYS_INFO_BUFFER_SIZE - left, left};
+ pj_str_t machine = {"arm-", 4};
+ pj_str_t sdk_name = {"iOS-SDK", 7};
+ size_t size = PJ_SYS_INFO_BUFFER_SIZE - machine.slen;
+ char tmp[PJ_SYS_INFO_BUFFER_SIZE];
+ int name[] = {CTL_HW,HW_MACHINE};
+
+ pj_iphone_os_get_sys_info(&si, &buf);
+ left -= si.os_name.slen + 1;
+
+ si.os_ver = parse_version(si.machine.ptr);
+
+ pj_memcpy(tmp, machine.ptr, machine.slen);
+ sysctl(name, 2, tmp+machine.slen, &size, NULL, 0);
+ ALLOC_CP_STR(tmp, machine);
+ si.sdk_name = sdk_name;
+
+ #ifdef PJ_SDK_NAME
+ pj_memcpy(tmp, PJ_SDK_NAME, pj_ansi_strlen(PJ_SDK_NAME) + 1);
+ si.sdk_ver = parse_version(tmp);
+ #endif
+ }
+ #else
+ {
+ struct utsname u;
+
+ /* Successful uname() returns zero on Linux and positive value
+ * on OpenSolaris.
+ */
+ if (uname(&u) == -1)
+ goto get_sdk_info;
+
+ ALLOC_CP_STR(u.machine, machine);
+ ALLOC_CP_STR(u.sysname, os_name);
+
+ si.os_ver = parse_version(u.release);
+ }
+ #endif
+#elif defined(_MSC_VER)
+ {
+ OSVERSIONINFO ovi;
+
+ ovi.dwOSVersionInfoSize = sizeof(ovi);
+
+ if (GetVersionEx(&ovi) == FALSE)
+ goto get_sdk_info;
+
+ si.os_ver = (ovi.dwMajorVersion << 24) |
+ (ovi.dwMinorVersion << 16);
+ #if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE
+ si.os_name = pj_str("wince");
+ #else
+ si.os_name = pj_str("win32");
+ #endif
+ }
+
+ {
+ SYSTEM_INFO wsi;
+
+ GetSystemInfo(&wsi);
+ switch (wsi.wProcessorArchitecture) {
+ #if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE
+ case PROCESSOR_ARCHITECTURE_ARM:
+ si.machine = pj_str("arm");
+ break;
+ case PROCESSOR_ARCHITECTURE_SHX:
+ si.machine = pj_str("shx");
+ break;
+ #else
+ case PROCESSOR_ARCHITECTURE_AMD64:
+ si.machine = pj_str("x86_64");
+ break;
+ case PROCESSOR_ARCHITECTURE_IA64:
+ si.machine = pj_str("ia64");
+ break;
+ case PROCESSOR_ARCHITECTURE_INTEL:
+ si.machine = pj_str("i386");
+ break;
+ #endif /* PJ_WIN32_WINCE */
+ }
+ }
+#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0
+ {
+ pj_symbianos_get_model_info(si_buffer, sizeof(si_buffer));
+ ALLOC_CP_STR(si_buffer, machine);
+
+ char *p = si_buffer + sizeof(si_buffer) - left;
+ unsigned plen;
+ plen = pj_symbianos_get_platform_info(p, left);
+ if (plen) {
+ /* Output format will be "Series60vX.X" */
+ si.os_name = pj_str("S60");
+ si.os_ver = parse_version(p+9);
+ } else {
+ si.os_name = pj_str("Unknown");
+ }
+
+ /* Avoid compile warning on Symbian. */
+ goto get_sdk_info;
+ }
+#endif
+
+ /*
+ * SDK info.
+ */
+get_sdk_info:
+
+#if defined(__GLIBC__)
+ si.sdk_ver = (__GLIBC__ << 24) |
+ (__GLIBC_MINOR__ << 16);
+ si.sdk_name = pj_str("glibc");
+#elif defined(__GNU_LIBRARY__)
+ si.sdk_ver = (__GNU_LIBRARY__ << 24) |
+ (__GNU_LIBRARY_MINOR__ << 16);
+ si.sdk_name = pj_str("libc");
+#elif defined(__UCLIBC__)
+ si.sdk_ver = (__UCLIBC_MAJOR__ << 24) |
+ (__UCLIBC_MINOR__ << 16);
+ si.sdk_name = pj_str("uclibc");
+#elif defined(_WIN32_WCE) && _WIN32_WCE
+ /* Old window mobile declares _WIN32_WCE as decimal (e.g. 300, 420, etc.),
+ * but then it was changed to use hex, e.g. 0x420, etc. See
+ * http://social.msdn.microsoft.com/forums/en-US/vssmartdevicesnative/thread/8a97c59f-5a1c-4bc6-99e6-427f065ff439/
+ */
+ #if _WIN32_WCE <= 500
+ si.sdk_ver = ( (_WIN32_WCE / 100) << 24) |
+ ( ((_WIN32_WCE % 100) / 10) << 16) |
+ ( (_WIN32_WCE % 10) << 8);
+ #else
+ si.sdk_ver = ( ((_WIN32_WCE & 0xFF00) >> 8) << 24) |
+ ( ((_WIN32_WCE & 0x00F0) >> 4) << 16) |
+ ( ((_WIN32_WCE & 0x000F) >> 0) << 8);
+ #endif
+ si.sdk_name = pj_str("cesdk");
+#elif defined(_MSC_VER)
+ /* No SDK info is easily obtainable for Visual C, so lets just use
+ * _MSC_VER. The _MSC_VER macro reports the major and minor versions
+ * of the compiler. For example, 1310 for Microsoft Visual C++ .NET 2003.
+ * 1310 represents version 13 and a 1.0 point release.
+ * The Visual C++ 2005 compiler version is 1400.
+ */
+ si.sdk_ver = ((_MSC_VER / 100) << 24) |
+ (((_MSC_VER % 100) / 10) << 16) |
+ ((_MSC_VER % 10) << 8);
+ si.sdk_name = pj_str("msvc");
+#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0
+ pj_symbianos_get_sdk_info(&si.sdk_name, &si.sdk_ver);
+#endif
+
+ /*
+ * Build the info string.
+ */
+ {
+ char tmp[PJ_SYS_INFO_BUFFER_SIZE];
+ char os_ver[20], sdk_ver[20];
+ int cnt;
+
+ cnt = pj_ansi_snprintf(tmp, sizeof(tmp),
+ "%s%s%s%s%s%s%s",
+ si.os_name.ptr,
+ ver_info(si.os_ver, os_ver),
+ (si.machine.slen ? "/" : ""),
+ si.machine.ptr,
+ (si.sdk_name.slen ? "/" : ""),
+ si.sdk_name.ptr,
+ ver_info(si.sdk_ver, sdk_ver));
+ if (cnt > 0 && cnt < (int)sizeof(tmp)) {
+ ALLOC_CP_STR(tmp, info);
+ }
+ }
+
+ si_initialized = PJ_TRUE;
+ return &si;
+}
diff --git a/jni/pjproject-android/.svn/pristine/7e/7edc38acaa495ad794e3db3471540f0653f2cd09.svn-base b/jni/pjproject-android/.svn/pristine/7e/7edc38acaa495ad794e3db3471540f0653f2cd09.svn-base
new file mode 100644
index 0000000..0a95e11
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7edc38acaa495ad794e3db3471540f0653f2cd09.svn-base
@@ -0,0 +1,556 @@
+/* $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
+ */
+#ifndef __PJ_SCANNER_H__
+#define __PJ_SCANNER_H__
+
+/**
+ * @file scanner.h
+ * @brief Text Scanning.
+ */
+
+#include <pjlib-util/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_SCAN Fast Text Scanning
+ * @ingroup PJLIB_TEXT
+ * @brief Text scanning utility.
+ *
+ * This module describes a fast text scanning functions.
+ *
+ * @{
+ */
+#if defined(PJ_SCANNER_USE_BITWISE) && PJ_SCANNER_USE_BITWISE != 0
+# include <pjlib-util/scanner_cis_bitwise.h>
+#else
+# include <pjlib-util/scanner_cis_uint.h>
+#endif
+
+/**
+ * Initialize scanner input specification buffer.
+ *
+ * @param cs_buf The scanner character specification.
+ */
+PJ_DECL(void) pj_cis_buf_init(pj_cis_buf_t *cs_buf);
+
+/**
+ * Create a new input specification.
+ *
+ * @param cs_buf Specification buffer.
+ * @param cis Character input specification to be initialized.
+ *
+ * @return PJ_SUCCESS if new specification has been successfully
+ * created, or PJ_ETOOMANY if there are already too many
+ * specifications in the buffer.
+ */
+PJ_DECL(pj_status_t) pj_cis_init(pj_cis_buf_t *cs_buf, pj_cis_t *cis);
+
+/**
+ * Create a new input specification based on an existing specification.
+ *
+ * @param new_cis The new specification to be initialized.
+ * @param existing The existing specification, from which the input
+ * bitmask will be copied to the new specification.
+ *
+ * @return PJ_SUCCESS if new specification has been successfully
+ * created, or PJ_ETOOMANY if there are already too many
+ * specifications in the buffer.
+ */
+PJ_DECL(pj_status_t) pj_cis_dup(pj_cis_t *new_cis, pj_cis_t *existing);
+
+/**
+ * Add the characters in the specified range '[cstart, cend)' to the
+ * specification (the last character itself ('cend') is not added).
+ *
+ * @param cis The scanner character specification.
+ * @param cstart The first character in the range.
+ * @param cend The next character after the last character in the range.
+ */
+PJ_DECL(void) pj_cis_add_range( pj_cis_t *cis, int cstart, int cend);
+
+/**
+ * Add alphabetic characters to the specification.
+ *
+ * @param cis The scanner character specification.
+ */
+PJ_DECL(void) pj_cis_add_alpha( pj_cis_t *cis);
+
+/**
+ * Add numeric characters to the specification.
+ *
+ * @param cis The scanner character specification.
+ */
+PJ_DECL(void) pj_cis_add_num( pj_cis_t *cis);
+
+/**
+ * Add the characters in the string to the specification.
+ *
+ * @param cis The scanner character specification.
+ * @param str The string.
+ */
+PJ_DECL(void) pj_cis_add_str( pj_cis_t *cis, const char *str);
+
+/**
+ * Add specification from another specification.
+ *
+ * @param cis The specification is to be set.
+ * @param rhs The specification to be copied.
+ */
+PJ_DECL(void) pj_cis_add_cis( pj_cis_t *cis, const pj_cis_t *rhs);
+
+/**
+ * Delete characters in the specified range from the specification.
+ *
+ * @param cis The scanner character specification.
+ * @param cstart The first character in the range.
+ * @param cend The next character after the last character in the range.
+ */
+PJ_DECL(void) pj_cis_del_range( pj_cis_t *cis, int cstart, int cend);
+
+/**
+ * Delete characters in the specified string from the specification.
+ *
+ * @param cis The scanner character specification.
+ * @param str The string.
+ */
+PJ_DECL(void) pj_cis_del_str( pj_cis_t *cis, const char *str);
+
+/**
+ * Invert specification.
+ *
+ * @param cis The scanner character specification.
+ */
+PJ_DECL(void) pj_cis_invert( pj_cis_t *cis );
+
+/**
+ * Check whether the specified character belongs to the specification.
+ *
+ * @param cis The scanner character specification.
+ * @param c The character to check for matching.
+ *
+ * @return Non-zero if match (not necessarily one).
+ */
+PJ_INLINE(int) pj_cis_match( const pj_cis_t *cis, pj_uint8_t c )
+{
+ return PJ_CIS_ISSET(cis, c);
+}
+
+
+/**
+ * Flags for scanner.
+ */
+enum
+{
+ /** This flags specifies that the scanner should automatically skip
+ whitespaces
+ */
+ PJ_SCAN_AUTOSKIP_WS = 1,
+
+ /** This flags specifies that the scanner should automatically skip
+ SIP header continuation. This flag implies PJ_SCAN_AUTOSKIP_WS.
+ */
+ PJ_SCAN_AUTOSKIP_WS_HEADER = 3,
+
+ /** Auto-skip new lines.
+ */
+ PJ_SCAN_AUTOSKIP_NEWLINE = 4
+};
+
+
+/* Forward decl. */
+struct pj_scanner;
+
+
+/**
+ * The callback function type to be called by the scanner when it encounters
+ * syntax error.
+ *
+ * @param scanner The scanner instance that calls the callback .
+ */
+typedef void (*pj_syn_err_func_ptr)(struct pj_scanner *scanner);
+
+
+/**
+ * The text scanner structure.
+ */
+typedef struct pj_scanner
+{
+ char *begin; /**< Start of input buffer. */
+ char *end; /**< End of input buffer. */
+ char *curptr; /**< Current pointer. */
+ int line; /**< Current line. */
+ char *start_line; /**< Where current line starts. */
+ int skip_ws; /**< Skip whitespace flag. */
+ pj_syn_err_func_ptr callback; /**< Syntax error callback. */
+} pj_scanner;
+
+
+/**
+ * This structure can be used by application to store the state of the parser,
+ * so that the scanner state can be rollback to this state when necessary.
+ */
+typedef struct pj_scan_state
+{
+ char *curptr; /**< Current scanner's pointer. */
+ int line; /**< Current line. */
+ char *start_line; /**< Start of current line. */
+} pj_scan_state;
+
+
+/**
+ * Initialize the scanner. Note that the input string buffer must have
+ * length at least buflen+1 because the scanner will NULL terminate the
+ * string during initialization.
+ *
+ * @param scanner The scanner to be initialized.
+ * @param bufstart The input buffer to scan. Note that buffer[buflen] will be
+ * filled with NULL char until scanner is destroyed, so
+ * the actual buffer length must be at least buflen+1.
+ * @param buflen The length of the input buffer, which normally is
+ * strlen(bufstart).
+ * @param options Zero, or combination of PJ_SCAN_AUTOSKIP_WS or
+ * PJ_SCAN_AUTOSKIP_WS_HEADER
+ * @param callback Callback to be called when the scanner encounters syntax
+ * error condition.
+ */
+PJ_DECL(void) pj_scan_init( pj_scanner *scanner, char *bufstart,
+ pj_size_t buflen,
+ unsigned options,
+ pj_syn_err_func_ptr callback );
+
+
+/**
+ * Call this function when application has finished using the scanner.
+ *
+ * @param scanner The scanner.
+ */
+PJ_DECL(void) pj_scan_fini( pj_scanner *scanner );
+
+
+/**
+ * Determine whether the EOF condition for the scanner has been met.
+ *
+ * @param scanner The scanner.
+ *
+ * @return Non-zero if scanner is EOF.
+ */
+PJ_INLINE(int) pj_scan_is_eof( const pj_scanner *scanner)
+{
+ return scanner->curptr >= scanner->end;
+}
+
+
+/**
+ * Peek strings in current position according to parameter spec, and return
+ * the strings in parameter out. The current scanner position will not be
+ * moved. If the scanner is already in EOF state, syntax error callback will
+ * be called thrown.
+ *
+ * @param scanner The scanner.
+ * @param spec The spec to match input string.
+ * @param out String to store the result.
+ *
+ * @return the character right after the peek-ed position or zero if there's
+ * no more characters.
+ */
+PJ_DECL(int) pj_scan_peek( pj_scanner *scanner,
+ const pj_cis_t *spec, pj_str_t *out);
+
+
+/**
+ * Peek len characters in current position, and return them in out parameter.
+ * Note that whitespaces or newlines will be returned as it is, regardless
+ * of PJ_SCAN_AUTOSKIP_WS settings. If the character left is less than len,
+ * syntax error callback will be called.
+ *
+ * @param scanner The scanner.
+ * @param len Length to peek.
+ * @param out String to store the result.
+ *
+ * @return the character right after the peek-ed position or zero if there's
+ * no more characters.
+ */
+PJ_DECL(int) pj_scan_peek_n( pj_scanner *scanner,
+ pj_size_t len, pj_str_t *out);
+
+
+/**
+ * Peek strings in current position until spec is matched, and return
+ * the strings in parameter out. The current scanner position will not be
+ * moved. If the scanner is already in EOF state, syntax error callback will
+ * be called.
+ *
+ * @param scanner The scanner.
+ * @param spec The peeking will stop when the input match this spec.
+ * @param out String to store the result.
+ *
+ * @return the character right after the peek-ed position.
+ */
+PJ_DECL(int) pj_scan_peek_until( pj_scanner *scanner,
+ const pj_cis_t *spec,
+ pj_str_t *out);
+
+
+/**
+ * Get characters from the buffer according to the spec, and return them
+ * in out parameter. The scanner will attempt to get as many characters as
+ * possible as long as the spec matches. If the first character doesn't
+ * match the spec, or scanner is already in EOF when this function is called,
+ * an exception will be thrown.
+ *
+ * @param scanner The scanner.
+ * @param spec The spec to match input string.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get( pj_scanner *scanner,
+ const pj_cis_t *spec, pj_str_t *out);
+
+
+/**
+ * Just like #pj_scan_get(), but additionally performs unescaping when
+ * escaped ('%') character is found. The input spec MUST NOT contain the
+ * specification for '%' characted.
+ *
+ * @param scanner The scanner.
+ * @param spec The spec to match input string.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_unescape( pj_scanner *scanner,
+ const pj_cis_t *spec, pj_str_t *out);
+
+
+/**
+ * Get characters between quotes. If current input doesn't match begin_quote,
+ * syntax error will be thrown. Note that the resulting string will contain
+ * the enclosing quote.
+ *
+ * @param scanner The scanner.
+ * @param begin_quote The character to begin the quote.
+ * @param end_quote The character to end the quote.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_quote( pj_scanner *scanner,
+ int begin_quote, int end_quote,
+ pj_str_t *out);
+
+/**
+ * Get characters between quotes. If current input doesn't match begin_quote,
+ * syntax error will be thrown. Note that the resulting string will contain
+ * the enclosing quote.
+ *
+ * @param scanner The scanner.
+ * @param begin_quotes The character array to begin the quotes. For example,
+ * the two characters " and '.
+ * @param end_quotes The character array to end the quotes. The position
+ * found in the begin_quotes array will be used to match
+ * the end quotes. So if the begin_quotes was the array
+ * of "'< the end_quotes should be "'>. If begin_array
+ * matched the ' then the end_quotes will look for ' to
+ * match at the end.
+ * @param qsize The size of the begin_quotes and end_quotes arrays.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_quotes(pj_scanner *scanner,
+ const char *begin_quotes,
+ const char *end_quotes, int qsize,
+ pj_str_t *out);
+
+
+/**
+ * Get N characters from the scanner.
+ *
+ * @param scanner The scanner.
+ * @param N Number of characters to get.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_n( pj_scanner *scanner,
+ unsigned N, pj_str_t *out);
+
+
+/**
+ * Get one character from the scanner.
+ *
+ * @param scanner The scanner.
+ *
+ * @return The character.
+ */
+PJ_DECL(int) pj_scan_get_char( pj_scanner *scanner );
+
+
+/**
+ * Get characters from the scanner and move the scanner position until the
+ * current character matches the spec.
+ *
+ * @param scanner The scanner.
+ * @param spec Get until the input match this spec.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_until( pj_scanner *scanner,
+ const pj_cis_t *spec, pj_str_t *out);
+
+
+/**
+ * Get characters from the scanner and move the scanner position until the
+ * current character matches until_char.
+ *
+ * @param scanner The scanner.
+ * @param until_char Get until the input match this character.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_until_ch( pj_scanner *scanner,
+ int until_char, pj_str_t *out);
+
+
+/**
+ * Get characters from the scanner and move the scanner position until the
+ * current character matches until_char.
+ *
+ * @param scanner The scanner.
+ * @param until_spec Get until the input match any of these characters.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_until_chr( pj_scanner *scanner,
+ const char *until_spec, pj_str_t *out);
+
+/**
+ * Advance the scanner N characters, and skip whitespace
+ * if necessary.
+ *
+ * @param scanner The scanner.
+ * @param N Number of characters to skip.
+ * @param skip Flag to specify whether whitespace should be skipped
+ * after skipping the characters.
+ */
+PJ_DECL(void) pj_scan_advance_n( pj_scanner *scanner,
+ unsigned N, pj_bool_t skip);
+
+
+/**
+ * Compare string in current position with the specified string.
+ *
+ * @param scanner The scanner.
+ * @param s The string to compare with.
+ * @param len Length of the string to compare.
+ *
+ * @return zero, <0, or >0 (just like strcmp()).
+ */
+PJ_DECL(int) pj_scan_strcmp( pj_scanner *scanner, const char *s, int len);
+
+
+/**
+ * Case-less string comparison of current position with the specified
+ * string.
+ *
+ * @param scanner The scanner.
+ * @param s The string to compare with.
+ * @param len Length of the string to compare with.
+ *
+ * @return zero, <0, or >0 (just like strcmp()).
+ */
+PJ_DECL(int) pj_scan_stricmp( pj_scanner *scanner, const char *s, int len);
+
+/**
+ * Perform case insensitive string comparison of string in current position,
+ * knowing that the string to compare only consists of alphanumeric
+ * characters.
+ *
+ * Note that unlike #pj_scan_stricmp, this function can only return zero or
+ * -1.
+ *
+ * @param scanner The scanner.
+ * @param s The string to compare with.
+ * @param len Length of the string to compare with.
+ *
+ * @return zero if equal or -1.
+ *
+ * @see strnicmp_alnum, pj_stricmp_alnum
+ */
+PJ_DECL(int) pj_scan_stricmp_alnum( pj_scanner *scanner, const char *s,
+ int len);
+
+
+/**
+ * Get a newline from the scanner. A newline is defined as '\\n', or '\\r', or
+ * "\\r\\n". If current input is not newline, syntax error will be thrown.
+ *
+ * @param scanner The scanner.
+ */
+PJ_DECL(void) pj_scan_get_newline( pj_scanner *scanner );
+
+
+/**
+ * Manually skip whitespaces according to flag that was specified when
+ * the scanner was initialized.
+ *
+ * @param scanner The scanner.
+ */
+PJ_DECL(void) pj_scan_skip_whitespace( pj_scanner *scanner );
+
+
+/**
+ * Skip current line.
+ *
+ * @param scanner The scanner.
+ */
+PJ_DECL(void) pj_scan_skip_line( pj_scanner *scanner );
+
+/**
+ * Save the full scanner state.
+ *
+ * @param scanner The scanner.
+ * @param state Variable to store scanner's state.
+ */
+PJ_DECL(void) pj_scan_save_state( const pj_scanner *scanner,
+ pj_scan_state *state);
+
+
+/**
+ * Restore the full scanner state.
+ * Note that this would not restore the string if application has modified
+ * it. This will only restore the scanner scanning position.
+ *
+ * @param scanner The scanner.
+ * @param state State of the scanner.
+ */
+PJ_DECL(void) pj_scan_restore_state( pj_scanner *scanner,
+ pj_scan_state *state);
+
+/**
+ * Get current column position.
+ *
+ * @param scanner The scanner.
+ *
+ * @return The column position.
+ */
+PJ_INLINE(int) pj_scan_get_col( const pj_scanner *scanner )
+{
+ return (int)(scanner->curptr - scanner->start_line);
+}
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+#endif
+
diff --git a/jni/pjproject-android/.svn/pristine/7e/7ef03d753d738b95da40d7383dfffb18e722435e.svn-base b/jni/pjproject-android/.svn/pristine/7e/7ef03d753d738b95da40d7383dfffb18e722435e.svn-base
new file mode 100644
index 0000000..31a9d2b
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/7e/7ef03d753d738b95da40d7383dfffb18e722435e.svn-base
@@ -0,0 +1,43 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2008-2009 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
+ */
+#ifndef __PJMEDIA_CONFIG_AUTO_H_
+#define __PJMEDIA_CONFIG_AUTO_H_
+
+/**
+ * @file config_auto.h
+ * @brief PJMEDIA configuration as set by autoconf script
+ */
+
+/*
+ * Note:
+ * The configuration in config_site.h overrides any other settings,
+ * including the setting as detected by autoconf.
+ */
+
+/* G711 codec */
+#ifndef PJMEDIA_HAS_G711_CODEC
+#undef PJMEDIA_HAS_G711_CODEC
+#endif
+
+
+#endif /* __PJMEDIA_CONFIG_AUTO_H_ */
+
+
+