* #36737: switch back to svn repo, remove assert in sip_transaction.c
diff --git a/jni/pjproject-android/.svn/pristine/d0/d009c2ed285810d026e8508f2a7111a1001bc892.svn-base b/jni/pjproject-android/.svn/pristine/d0/d009c2ed285810d026e8508f2a7111a1001bc892.svn-base
new file mode 100644
index 0000000..43c411e
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d009c2ed285810d026e8508f2a7111a1001bc892.svn-base
@@ -0,0 +1,105 @@
+/*
+ * ut_sim.c
+ *
+ * an unreliable transport simulator
+ * (for testing replay databases and suchlike)
+ *
+ * David A. McGrew
+ * Cisco Systems, Inc.
+ */
+
+/*
+ *
+ * Copyright (c) 2001-2006, Cisco Systems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * Neither the name of the Cisco Systems, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+
+#include "ut_sim.h"
+
+
+int
+ut_compar(const void *a, const void *b) {
+ return rand() > (RAND_MAX/2) ? -1 : 1;
+}
+
+void
+ut_init(ut_connection *utc) {
+ int i;
+ utc->index = 0;
+
+ for (i=0; i < UT_BUF; i++)
+ utc->buffer[i] = i;
+
+ qsort(utc->buffer, UT_BUF, sizeof(uint32_t), ut_compar);
+
+ utc->index = UT_BUF - 1;
+}
+
+uint32_t
+ut_next_index(ut_connection *utc) {
+ uint32_t tmp;
+
+ tmp = utc->buffer[0];
+ utc->index++;
+ utc->buffer[0] = utc->index;
+
+ qsort(utc->buffer, UT_BUF, sizeof(uint32_t), ut_compar);
+
+ return tmp;
+}
+
+
+
+#ifdef UT_TEST
+
+#include <stdio.h>
+
+int
+main() {
+ uint32_t i, irecvd, idiff;
+ ut_connection utc;
+
+ ut_init(&utc);
+
+ for (i=0; i < 1000; i++) {
+ irecvd = ut_next_index(&utc);
+ idiff = i - irecvd;
+ printf("%lu\t%lu\t%d\n", i, irecvd, idiff);
+ }
+
+ return 0;
+}
+
+
+#endif
diff --git a/jni/pjproject-android/.svn/pristine/d0/d0160f970f500d1f3387b101ae07a785ed6a7495.svn-base b/jni/pjproject-android/.svn/pristine/d0/d0160f970f500d1f3387b101ae07a785ed6a7495.svn-base
new file mode 100644
index 0000000..26b0785
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d0160f970f500d1f3387b101ae07a785ed6a7495.svn-base
@@ -0,0 +1,82 @@
+#
+# cfg_msvc.py - MSVC/Visual Studio target configurator
+#
+# Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
+#
+# 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
+#
+import builder
+import os
+import sys
+
+# Each configurator must export this function
+def create_builder(args):
+ usage = """\
+Usage:
+ main.py cfg_msvc [-h|--help] [-t|--target TARGET] [cfg_site]
+
+Arguments:
+ cfg_site: site configuration module. If not specified, "cfg_site"
+ is implied
+ -t,--target TARGET: Visual Studio build configuration to build. Default is
+ "Release|Win32". Sample values: "Debug|Win32"
+ -h, --help Show this help screen
+
+"""
+
+ cfg_site = "cfg_site"
+ target = "Release|Win32"
+ in_option = ""
+
+ for arg in args:
+ if in_option=="-t":
+ target = arg
+ in_option = ""
+ elif arg=="--target" or arg=="-t":
+ in_option = "-t"
+ elif arg=="-h" or arg=="--help":
+ print usage
+ sys.exit(0)
+ elif arg[0]=="-":
+ print usage
+ sys.exit(1)
+ else:
+ cfg_site = arg
+
+ if os.access(cfg_site+".py", os.F_OK) == False:
+ print "Error: file '%s.py' doesn't exist." % (cfg_site)
+ sys.exit(1)
+
+ cfg_site = __import__(cfg_site)
+ test_cfg = builder.BaseConfig(cfg_site.BASE_DIR, \
+ cfg_site.URL, \
+ cfg_site.SITE_NAME, \
+ cfg_site.GROUP, \
+ cfg_site.OPTIONS)
+
+ config_site = "#define PJ_TODO(x)\n" + cfg_site.CONFIG_SITE
+ user_mak = cfg_site.USER_MAK
+
+ builders = [
+ builder.MSVCTestBuilder(test_cfg,
+ target=target,
+ build_config_name="default",
+ config_site=config_site,
+ exclude=cfg_site.EXCLUDE,
+ not_exclude=cfg_site.NOT_EXCLUDE)
+ ]
+
+ return builders
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d01644083b68caa2a36fc29a83576d3f2baec452.svn-base b/jni/pjproject-android/.svn/pristine/d0/d01644083b68caa2a36fc29a83576d3f2baec452.svn-base
new file mode 100644
index 0000000..d4c69db
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d01644083b68caa2a36fc29a83576d3f2baec452.svn-base
@@ -0,0 +1,359 @@
+//------------------------------------------------------------------------------
+// File: WXDebug.h
+//
+// Desc: DirectShow base classes - provides debugging facilities.
+//
+// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
+//------------------------------------------------------------------------------
+
+
+#ifndef __WXDEBUG__
+#define __WXDEBUG__
+
+// This library provides fairly straight forward debugging functionality, this
+// is split into two main sections. The first is assertion handling, there are
+// three types of assertions provided here. The most commonly used one is the
+// ASSERT(condition) macro which will pop up a message box including the file
+// and line number if the condition evaluates to FALSE. Then there is the
+// EXECUTE_ASSERT macro which is the same as ASSERT except the condition will
+// still be executed in NON debug builds. The final type of assertion is the
+// KASSERT macro which is more suitable for pure (perhaps kernel) filters as
+// the condition is printed onto the debugger rather than in a message box.
+//
+// The other part of the debug module facilties is general purpose logging.
+// This is accessed by calling DbgLog(). The function takes a type and level
+// field which define the type of informational string you are presenting and
+// it's relative importance. The type field can be a combination (one or more)
+// of LOG_TIMING, LOG_TRACE, LOG_MEMORY, LOG_LOCKING and LOG_ERROR. The level
+// is a DWORD value where zero defines highest important. Use of zero as the
+// debug logging level is to be encouraged ONLY for major errors or events as
+// they will ALWAYS be displayed on the debugger. Other debug output has it's
+// level matched against the current debug output level stored in the registry
+// for this module and if less than the current setting it will be displayed.
+//
+// Each module or executable has it's own debug output level for each of the
+// five types. These are read in when the DbgInitialise function is called
+// for DLLs linking to STRMBASE.LIB this is done automatically when the DLL
+// is loaded, executables must call it explicitely with the module instance
+// handle given to them through the WINMAIN entry point. An executable must
+// also call DbgTerminate when they have finished to clean up the resources
+// the debug library uses, once again this is done automatically for DLLs
+
+// These are the five different categories of logging information
+
+enum { LOG_TIMING = 0x01, // Timing and performance measurements
+ LOG_TRACE = 0x02, // General step point call tracing
+ LOG_MEMORY = 0x04, // Memory and object allocation/destruction
+ LOG_LOCKING = 0x08, // Locking/unlocking of critical sections
+ LOG_ERROR = 0x10, // Debug error notification
+ LOG_CUSTOM1 = 0x20,
+ LOG_CUSTOM2 = 0x40,
+ LOG_CUSTOM3 = 0x80,
+ LOG_CUSTOM4 = 0x100,
+ LOG_CUSTOM5 = 0x200,
+};
+
+#define LOG_FORCIBLY_SET 0x80000000
+
+enum { CDISP_HEX = 0x01,
+ CDISP_DEC = 0x02};
+
+// For each object created derived from CBaseObject (in debug builds) we
+// create a descriptor that holds it's name (statically allocated memory)
+// and a cookie we assign it. We keep a list of all the active objects
+// we have registered so that we can dump a list of remaining objects
+
+typedef struct tag_ObjectDesc {
+ LPCSTR m_szName;
+ LPCWSTR m_wszName;
+ DWORD m_dwCookie;
+ tag_ObjectDesc *m_pNext;
+} ObjectDesc;
+
+#define DLLIMPORT __declspec(dllimport)
+#define DLLEXPORT __declspec(dllexport)
+
+#ifdef DEBUG
+
+ #define NAME(x) TEXT(x)
+
+ // These are used internally by the debug library (PRIVATE)
+
+ void WINAPI DbgInitKeyLevels(HKEY hKey, bool fTakeMax);
+ void WINAPI DbgInitGlobalSettings(bool fTakeMax);
+ void WINAPI DbgInitModuleSettings(bool fTakeMax);
+ void WINAPI DbgInitModuleName();
+ DWORD WINAPI DbgRegisterObjectCreation(
+ LPCSTR szObjectName, LPCWSTR wszObjectName);
+
+ BOOL WINAPI DbgRegisterObjectDestruction(DWORD dwCookie);
+
+ // These are the PUBLIC entry points
+
+ BOOL WINAPI DbgCheckModuleLevel(DWORD Type,DWORD Level);
+ void WINAPI DbgSetModuleLevel(DWORD Type,DWORD Level);
+ void WINAPI DbgSetAutoRefreshLevels(bool fAuto);
+
+ // Initialise the library with the module handle
+
+ void WINAPI DbgInitialise(HINSTANCE hInst);
+ void WINAPI DbgTerminate();
+
+ void WINAPI DbgDumpObjectRegister();
+
+ // Display error and logging to the user
+
+ void WINAPI DbgAssert(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
+ void WINAPI DbgBreakPoint(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
+ void WINAPI DbgBreakPoint(LPCTSTR pFileName,INT iLine,__format_string LPCTSTR szFormatString,...);
+
+ void WINAPI DbgKernelAssert(LPCTSTR pCondition,LPCTSTR pFileName,INT iLine);
+ void WINAPI DbgLogInfo(DWORD Type,DWORD Level,__format_string LPCTSTR pFormat,...);
+#ifdef UNICODE
+ void WINAPI DbgLogInfo(DWORD Type,DWORD Level,__format_string LPCSTR pFormat,...);
+ void WINAPI DbgAssert(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
+ void WINAPI DbgBreakPoint(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
+ void WINAPI DbgKernelAssert(LPCSTR pCondition,LPCSTR pFileName,INT iLine);
+#endif
+ void WINAPI DbgOutString(LPCTSTR psz);
+
+ // Debug infinite wait stuff
+ DWORD WINAPI DbgWaitForSingleObject(HANDLE h);
+ DWORD WINAPI DbgWaitForMultipleObjects(DWORD nCount,
+ __in_ecount(nCount) CONST HANDLE *lpHandles,
+ BOOL bWaitAll);
+ void WINAPI DbgSetWaitTimeout(DWORD dwTimeout);
+
+#ifdef __strmif_h__
+ // Display a media type: Terse at level 2, verbose at level 5
+ void WINAPI DisplayType(LPCTSTR label, const AM_MEDIA_TYPE *pmtIn);
+
+ // Dump lots of information about a filter graph
+ void WINAPI DumpGraph(IFilterGraph *pGraph, DWORD dwLevel);
+#endif
+
+ #define KASSERT(_x_) if (!(_x_)) \
+ DbgKernelAssert(TEXT(#_x_),TEXT(__FILE__),__LINE__)
+
+ // Break on the debugger without putting up a message box
+ // message goes to debugger instead
+
+ #define KDbgBreak(_x_) \
+ DbgKernelAssert(TEXT(#_x_),TEXT(__FILE__),__LINE__)
+
+ // We chose a common name for our ASSERT macro, MFC also uses this name
+ // So long as the implementation evaluates the condition and handles it
+ // then we will be ok. Rather than override the behaviour expected we
+ // will leave whatever first defines ASSERT as the handler (i.e. MFC)
+ #ifndef ASSERT
+ #define ASSERT(_x_) if (!(_x_)) \
+ DbgAssert(TEXT(#_x_),TEXT(__FILE__),__LINE__)
+ #endif
+
+ #define DbgAssertAligned( _ptr_, _alignment_ ) ASSERT( ((DWORD_PTR) (_ptr_)) % (_alignment_) == 0)
+
+ // Put up a message box informing the user of a halt
+ // condition in the program
+
+ #define DbgBreak(_x_) \
+ DbgBreakPoint(TEXT(#_x_),TEXT(__FILE__),__LINE__)
+
+ #define EXECUTE_ASSERT(_x_) ASSERT(_x_)
+ #define DbgLog(_x_) DbgLogInfo _x_
+ // MFC style trace macros
+
+ #define NOTE(_x_) DbgLog((LOG_TRACE,5,TEXT(_x_)))
+ #define NOTE1(_x_,a) DbgLog((LOG_TRACE,5,TEXT(_x_),a))
+ #define NOTE2(_x_,a,b) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b))
+ #define NOTE3(_x_,a,b,c) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c))
+ #define NOTE4(_x_,a,b,c,d) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c,d))
+ #define NOTE5(_x_,a,b,c,d,e) DbgLog((LOG_TRACE,5,TEXT(_x_),a,b,c,d,e))
+
+#else
+
+ // Retail builds make public debug functions inert - WARNING the source
+ // files do not define or build any of the entry points in debug builds
+ // (public entry points compile to nothing) so if you go trying to call
+ // any of the private entry points in your source they won't compile
+
+ #define NAME(_x_) ((LPTSTR) NULL)
+
+ #define DbgInitialise(hInst)
+ #define DbgTerminate()
+ #define DbgLog(_x_) 0
+ #define DbgOutString(psz)
+ #define DbgAssertAligned( _ptr_, _alignment_ ) 0
+
+ #define DbgRegisterObjectCreation(pObjectName)
+ #define DbgRegisterObjectDestruction(dwCookie)
+ #define DbgDumpObjectRegister()
+
+ #define DbgCheckModuleLevel(Type,Level)
+ #define DbgSetModuleLevel(Type,Level)
+ #define DbgSetAutoRefreshLevels(fAuto)
+
+ #define DbgWaitForSingleObject(h) WaitForSingleObject(h, INFINITE)
+ #define DbgWaitForMultipleObjects(nCount, lpHandles, bWaitAll) \
+ WaitForMultipleObjects(nCount, lpHandles, bWaitAll, INFINITE)
+ #define DbgSetWaitTimeout(dwTimeout)
+
+ #define KDbgBreak(_x_)
+ #define DbgBreak(_x_)
+
+ #define KASSERT(_x_) ((void)0)
+ #ifndef ASSERT
+ #define ASSERT(_x_) ((void)0)
+ #endif
+ #define EXECUTE_ASSERT(_x_) ((void)(_x_))
+
+ // MFC style trace macros
+
+ #define NOTE(_x_) ((void)0)
+ #define NOTE1(_x_,a) ((void)0)
+ #define NOTE2(_x_,a,b) ((void)0)
+ #define NOTE3(_x_,a,b,c) ((void)0)
+ #define NOTE4(_x_,a,b,c,d) ((void)0)
+ #define NOTE5(_x_,a,b,c,d,e) ((void)0)
+
+ #define DisplayType(label, pmtIn) ((void)0)
+ #define DumpGraph(pGraph, label) ((void)0)
+#endif
+
+
+// Checks a pointer which should be non NULL - can be used as follows.
+
+#define CheckPointer(p,ret) {if((p)==NULL) return (ret);}
+
+// HRESULT Foo(VOID *pBar)
+// {
+// CheckPointer(pBar,E_INVALIDARG)
+// }
+//
+// Or if the function returns a boolean
+//
+// BOOL Foo(VOID *pBar)
+// {
+// CheckPointer(pBar,FALSE)
+// }
+
+#define ValidateReadPtr(p,cb) 0
+#define ValidateWritePtr(p,cb) 0
+#define ValidateReadWritePtr(p,cb) 0
+#define ValidateStringPtr(p) 0
+#define ValidateStringPtrA(p) 0
+#define ValidateStringPtrW(p) 0
+
+
+#ifdef _OBJBASE_H_
+
+ // Outputting GUID names. If you want to include the name
+ // associated with a GUID (eg CLSID_...) then
+ //
+ // GuidNames[yourGUID]
+ //
+ // Returns the name defined in uuids.h as a string
+
+ typedef struct {
+ CHAR *szName;
+ GUID guid;
+ } GUID_STRING_ENTRY;
+
+ class CGuidNameList {
+ public:
+ CHAR *operator [] (const GUID& guid);
+ };
+
+ extern CGuidNameList GuidNames;
+
+#endif
+
+#ifndef REMIND
+ // REMIND macro - generates warning as reminder to complete coding
+ // (eg) usage:
+ //
+ // #pragma message (REMIND("Add automation support"))
+
+
+ #define QUOTE(x) #x
+ #define QQUOTE(y) QUOTE(y)
+ #define REMIND(str) __FILE__ "(" QQUOTE(__LINE__) ") : " str
+#endif
+
+// Method to display objects in a useful format
+//
+// eg If you want to display a LONGLONG ll in a debug string do (eg)
+//
+// DbgLog((LOG_TRACE, n, TEXT("Value is %s"), (LPCTSTR)CDisp(ll, CDISP_HEX)));
+
+
+class CDispBasic
+{
+public:
+ CDispBasic() { m_pString = m_String; };
+ ~CDispBasic();
+protected:
+ PTCHAR m_pString; // normally points to m_String... unless too much data
+ TCHAR m_String[50];
+};
+class CDisp : public CDispBasic
+{
+public:
+ CDisp(LONGLONG ll, int Format = CDISP_HEX); // Display a LONGLONG in CDISP_HEX or CDISP_DEC form
+ CDisp(REFCLSID clsid); // Display a GUID
+ CDisp(double d); // Display a floating point number
+#ifdef __strmif_h__
+#ifdef __STREAMS__
+ CDisp(CRefTime t); // Display a Reference Time
+#endif
+ CDisp(IPin *pPin); // Display a pin as {filter clsid}(pin name)
+ CDisp(IUnknown *pUnk); // Display a filter or pin
+#endif // __strmif_h__
+ ~CDisp();
+
+ // Implement cast to (LPCTSTR) as parameter to logger
+ operator LPCTSTR()
+ {
+ return (LPCTSTR)m_pString;
+ };
+};
+
+
+#if defined(DEBUG)
+class CAutoTrace
+{
+private:
+ LPCTSTR _szBlkName;
+ const int _level;
+ static const TCHAR _szEntering[];
+ static const TCHAR _szLeaving[];
+public:
+ CAutoTrace(LPCTSTR szBlkName, const int level = 15)
+ : _szBlkName(szBlkName), _level(level)
+ {DbgLog((LOG_TRACE, _level, _szEntering, _szBlkName));}
+
+ ~CAutoTrace()
+ {DbgLog((LOG_TRACE, _level, _szLeaving, _szBlkName));}
+};
+
+#if defined (__FUNCTION__)
+
+#define AMTRACEFN() CAutoTrace __trace(TEXT(__FUNCTION__))
+#define AMTRACE(_x_) CAutoTrace __trace(TEXT(__FUNCTION__))
+
+#else
+
+#define AMTRACE(_x_) CAutoTrace __trace _x_
+#define AMTRACEFN()
+
+#endif
+
+#else
+
+#define AMTRACE(_x_)
+#define AMTRACEFN()
+
+#endif
+
+#endif // __WXDEBUG__
+
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d016db379d75cf2372c336e4382abe4df6abede0.svn-base b/jni/pjproject-android/.svn/pristine/d0/d016db379d75cf2372c336e4382abe4df6abede0.svn-base
new file mode 100644
index 0000000..ffc0d8e
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d016db379d75cf2372c336e4382abe4df6abede0.svn-base
@@ -0,0 +1,82 @@
+/* $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/except.h>
+#include <pj/rand.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/**
+ * \page page_pjlib_samples_except_c Example: Exception Handling
+ *
+ * Below is sample program to demonstrate how to use exception handling.
+ *
+ * \includelineno pjlib-samples/except.c
+ */
+
+static pj_exception_id_t NO_MEMORY, OTHER_EXCEPTION;
+
+static void randomly_throw_exception()
+{
+ if (pj_rand() % 2)
+ PJ_THROW(OTHER_EXCEPTION);
+}
+
+static void *my_malloc(size_t size)
+{
+ void *ptr = malloc(size);
+ if (!ptr)
+ PJ_THROW(NO_MEMORY);
+ return ptr;
+}
+
+static int test_exception()
+{
+ PJ_USE_EXCEPTION;
+
+ PJ_TRY {
+ void *data = my_malloc(200);
+ free(data);
+ randomly_throw_exception();
+ }
+ PJ_CATCH_ANY {
+ pj_exception_id_t x_id;
+
+ x_id = PJ_GET_EXCEPTION();
+ printf("Caught exception %d (%s)\n",
+ x_id, pj_exception_id_name(x_id));
+ }
+ PJ_END
+ return 1;
+}
+
+int main()
+{
+ pj_status_t rc;
+
+ // Error handling is omited for clarity.
+
+ rc = pj_init();
+
+ rc = pj_exception_id_alloc("No Memory", &NO_MEMORY);
+ rc = pj_exception_id_alloc("Other Exception", &OTHER_EXCEPTION);
+
+ return test_exception();
+}
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d01e24ffedfce7853fca84ef4d0c66708b064482.svn-base b/jni/pjproject-android/.svn/pristine/d0/d01e24ffedfce7853fca84ef4d0c66708b064482.svn-base
new file mode 100644
index 0000000..b85e336
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d01e24ffedfce7853fca84ef4d0c66708b064482.svn-base
@@ -0,0 +1,409 @@
+/* $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/ip_helper.h>
+#include <pj/addr_resolv.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/string.h>
+#include <pj/compat/socket.h>
+#include <pj/sock.h>
+
+/* Set to 1 to enable tracing */
+#if 0
+# include <pj/log.h>
+# define THIS_FILE "ip_helper_generic.c"
+# define TRACE_(exp) PJ_LOG(5,exp)
+ static const char *get_os_errmsg(void)
+ {
+ static char errmsg[PJ_ERR_MSG_SIZE];
+ pj_strerror(pj_get_os_error(), errmsg, sizeof(errmsg));
+ return errmsg;
+ }
+ static const char *get_addr(void *addr)
+ {
+ static char txt[PJ_INET6_ADDRSTRLEN];
+ struct sockaddr *ad = (struct sockaddr*)addr;
+ if (ad->sa_family != PJ_AF_INET && ad->sa_family != PJ_AF_INET6)
+ return "?";
+ return pj_inet_ntop2(ad->sa_family, pj_sockaddr_get_addr(ad),
+ txt, sizeof(txt));
+ }
+#else
+# define TRACE_(exp)
+#endif
+
+
+#if 0
+ /* dummy */
+
+#elif defined(PJ_HAS_IFADDRS_H) && PJ_HAS_IFADDRS_H != 0 && \
+ defined(PJ_HAS_NET_IF_H) && PJ_HAS_NET_IF_H != 0
+/* Using getifaddrs() is preferred since it can work with both IPv4 and IPv6 */
+static pj_status_t if_enum_by_af(int af,
+ unsigned *p_cnt,
+ pj_sockaddr ifs[])
+{
+ struct ifaddrs *ifap = NULL, *it;
+ unsigned max;
+
+ PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL);
+
+ TRACE_((THIS_FILE, "Starting interface enum with getifaddrs() for af=%d",
+ af));
+
+ if (getifaddrs(&ifap) != 0) {
+ TRACE_((THIS_FILE, " getifarrds() failed: %s", get_os_errmsg()));
+ return PJ_RETURN_OS_ERROR(pj_get_netos_error());
+ }
+
+ it = ifap;
+ max = *p_cnt;
+ *p_cnt = 0;
+ for (; it!=NULL && *p_cnt < max; it = it->ifa_next) {
+ struct sockaddr *ad = it->ifa_addr;
+
+ TRACE_((THIS_FILE, " checking %s", it->ifa_name));
+
+ if ((it->ifa_flags & IFF_UP)==0) {
+ TRACE_((THIS_FILE, " interface is down"));
+ continue; /* Skip when interface is down */
+ }
+
+#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF
+ if (it->ifa_flags & IFF_LOOPBACK) {
+ TRACE_((THIS_FILE, " loopback interface"));
+ continue; /* Skip loopback interface */
+ }
+#endif
+
+ if (ad==NULL) {
+ TRACE_((THIS_FILE, " NULL address ignored"));
+ continue; /* reported to happen on Linux 2.6.25.9
+ with ppp interface */
+ }
+
+ if (ad->sa_family != af) {
+ TRACE_((THIS_FILE, " address %s ignored (af=%d)",
+ get_addr(ad), ad->sa_family));
+ continue; /* Skip when interface is down */
+ }
+
+ /* Ignore 0.0.0.0/8 address. This is a special address
+ * which doesn't seem to have practical use.
+ */
+ if (af==pj_AF_INET() &&
+ (pj_ntohl(((pj_sockaddr_in*)ad)->sin_addr.s_addr) >> 24) == 0)
+ {
+ TRACE_((THIS_FILE, " address %s ignored (0.0.0.0/8 class)",
+ get_addr(ad), ad->sa_family));
+ continue;
+ }
+
+ TRACE_((THIS_FILE, " address %s (af=%d) added at index %d",
+ get_addr(ad), ad->sa_family, *p_cnt));
+
+ pj_bzero(&ifs[*p_cnt], sizeof(ifs[0]));
+ pj_memcpy(&ifs[*p_cnt], ad, pj_sockaddr_get_len(ad));
+ PJ_SOCKADDR_RESET_LEN(&ifs[*p_cnt]);
+ (*p_cnt)++;
+ }
+
+ freeifaddrs(ifap);
+ TRACE_((THIS_FILE, "done, found %d address(es)", *p_cnt));
+ return (*p_cnt != 0) ? PJ_SUCCESS : PJ_ENOTFOUND;
+}
+
+#elif defined(SIOCGIFCONF) && \
+ defined(PJ_HAS_NET_IF_H) && PJ_HAS_NET_IF_H != 0
+
+/* Note: this does not work with IPv6 */
+static pj_status_t if_enum_by_af(int af,
+ unsigned *p_cnt,
+ pj_sockaddr ifs[])
+{
+ pj_sock_t sock;
+ char buf[512];
+ struct ifconf ifc;
+ struct ifreq *ifr;
+ int i, count;
+ pj_status_t status;
+
+ PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL);
+
+ TRACE_((THIS_FILE, "Starting interface enum with SIOCGIFCONF for af=%d",
+ af));
+
+ status = pj_sock_socket(af, PJ_SOCK_DGRAM, 0, &sock);
+ if (status != PJ_SUCCESS)
+ return status;
+
+ /* Query available interfaces */
+ ifc.ifc_len = sizeof(buf);
+ ifc.ifc_buf = buf;
+
+ if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) {
+ int oserr = pj_get_netos_error();
+ TRACE_((THIS_FILE, " ioctl(SIOCGIFCONF) failed: %s", get_os_errmsg()));
+ pj_sock_close(sock);
+ return PJ_RETURN_OS_ERROR(oserr);
+ }
+
+ /* Interface interfaces */
+ ifr = (struct ifreq*) ifc.ifc_req;
+ count = ifc.ifc_len / sizeof(struct ifreq);
+ if (count > *p_cnt)
+ count = *p_cnt;
+
+ *p_cnt = 0;
+ for (i=0; i<count; ++i) {
+ struct ifreq *itf = &ifr[i];
+ struct ifreq iff = *itf;
+ struct sockaddr *ad = &itf->ifr_addr;
+
+ TRACE_((THIS_FILE, " checking interface %s", itf->ifr_name));
+
+ /* Skip address with different family */
+ if (ad->sa_family != af) {
+ TRACE_((THIS_FILE, " address %s (af=%d) ignored",
+ get_addr(ad), (int)ad->sa_family));
+ continue;
+ }
+
+ if (ioctl(sock, SIOCGIFFLAGS, &iff) != 0) {
+ TRACE_((THIS_FILE, " ioctl(SIOCGIFFLAGS) failed: %s",
+ get_os_errmsg()));
+ continue; /* Failed to get flags, continue */
+ }
+
+ if ((iff.ifr_flags & IFF_UP)==0) {
+ TRACE_((THIS_FILE, " interface is down"));
+ continue; /* Skip when interface is down */
+ }
+
+#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF
+ if (iff.ifr_flags & IFF_LOOPBACK) {
+ TRACE_((THIS_FILE, " loopback interface"));
+ continue; /* Skip loopback interface */
+ }
+#endif
+
+ /* Ignore 0.0.0.0/8 address. This is a special address
+ * which doesn't seem to have practical use.
+ */
+ if (af==pj_AF_INET() &&
+ (pj_ntohl(((pj_sockaddr_in*)ad)->sin_addr.s_addr) >> 24) == 0)
+ {
+ TRACE_((THIS_FILE, " address %s ignored (0.0.0.0/8 class)",
+ get_addr(ad), ad->sa_family));
+ continue;
+ }
+
+ TRACE_((THIS_FILE, " address %s (af=%d) added at index %d",
+ get_addr(ad), ad->sa_family, *p_cnt));
+
+ pj_bzero(&ifs[*p_cnt], sizeof(ifs[0]));
+ pj_memcpy(&ifs[*p_cnt], ad, pj_sockaddr_get_len(ad));
+ PJ_SOCKADDR_RESET_LEN(&ifs[*p_cnt]);
+ (*p_cnt)++;
+ }
+
+ /* Done with socket */
+ pj_sock_close(sock);
+
+ TRACE_((THIS_FILE, "done, found %d address(es)", *p_cnt));
+ return (*p_cnt != 0) ? PJ_SUCCESS : PJ_ENOTFOUND;
+}
+
+
+#elif defined(PJ_HAS_NET_IF_H) && PJ_HAS_NET_IF_H != 0
+/* Note: this does not work with IPv6 */
+static pj_status_t if_enum_by_af(int af, unsigned *p_cnt, pj_sockaddr ifs[])
+{
+ struct if_nameindex *if_list;
+ struct ifreq ifreq;
+ pj_sock_t sock;
+ unsigned i, max_count;
+ pj_status_t status;
+
+ PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL);
+
+ TRACE_((THIS_FILE, "Starting if_nameindex() for af=%d", af));
+
+ status = pj_sock_socket(af, PJ_SOCK_DGRAM, 0, &sock);
+ if (status != PJ_SUCCESS)
+ return status;
+
+ if_list = if_nameindex();
+ if (if_list == NULL)
+ return PJ_ENOTFOUND;
+
+ max_count = *p_cnt;
+ *p_cnt = 0;
+ for (i=0; if_list[i].if_index && *p_cnt<max_count; ++i) {
+ struct sockaddr *ad;
+ int rc;
+
+ strncpy(ifreq.ifr_name, if_list[i].if_name, IFNAMSIZ);
+
+ TRACE_((THIS_FILE, " checking interface %s", ifreq.ifr_name));
+
+ if ((rc=ioctl(sock, SIOCGIFFLAGS, &ifreq)) != 0) {
+ TRACE_((THIS_FILE, " ioctl(SIOCGIFFLAGS) failed: %s",
+ get_os_errmsg()));
+ continue; /* Failed to get flags, continue */
+ }
+
+ if ((ifreq.ifr_flags & IFF_UP)==0) {
+ TRACE_((THIS_FILE, " interface is down"));
+ continue; /* Skip when interface is down */
+ }
+
+#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF
+ if (ifreq.ifr_flags & IFF_LOOPBACK) {
+ TRACE_((THIS_FILE, " loopback interface"));
+ continue; /* Skip loopback interface */
+ }
+#endif
+
+ /* Note: SIOCGIFADDR does not work for IPv6! */
+ if ((rc=ioctl(sock, SIOCGIFADDR, &ifreq)) != 0) {
+ TRACE_((THIS_FILE, " ioctl(SIOCGIFADDR) failed: %s",
+ get_os_errmsg()));
+ continue; /* Failed to get address, continue */
+ }
+
+ ad = (struct sockaddr*) &ifreq.ifr_addr;
+
+ if (ad->sa_family != af) {
+ TRACE_((THIS_FILE, " address %s family %d ignored",
+ get_addr(&ifreq.ifr_addr),
+ ifreq.ifr_addr.sa_family));
+ continue; /* Not address family that we want, continue */
+ }
+
+ /* Ignore 0.0.0.0/8 address. This is a special address
+ * which doesn't seem to have practical use.
+ */
+ if (af==pj_AF_INET() &&
+ (pj_ntohl(((pj_sockaddr_in*)ad)->sin_addr.s_addr) >> 24) == 0)
+ {
+ TRACE_((THIS_FILE, " address %s ignored (0.0.0.0/8 class)",
+ get_addr(ad), ad->sa_family));
+ continue;
+ }
+
+ /* Got an address ! */
+ TRACE_((THIS_FILE, " address %s (af=%d) added at index %d",
+ get_addr(ad), ad->sa_family, *p_cnt));
+
+ pj_bzero(&ifs[*p_cnt], sizeof(ifs[0]));
+ pj_memcpy(&ifs[*p_cnt], ad, pj_sockaddr_get_len(ad));
+ PJ_SOCKADDR_RESET_LEN(&ifs[*p_cnt]);
+ (*p_cnt)++;
+ }
+
+ if_freenameindex(if_list);
+ pj_sock_close(sock);
+
+ TRACE_((THIS_FILE, "done, found %d address(es)", *p_cnt));
+ return (*p_cnt != 0) ? PJ_SUCCESS : PJ_ENOTFOUND;
+}
+
+#else
+static pj_status_t if_enum_by_af(int af,
+ unsigned *p_cnt,
+ pj_sockaddr ifs[])
+{
+ pj_status_t status;
+
+ PJ_ASSERT_RETURN(p_cnt && *p_cnt > 0 && ifs, PJ_EINVAL);
+
+ pj_bzero(ifs, sizeof(ifs[0]) * (*p_cnt));
+
+ /* Just get one default route */
+ status = pj_getdefaultipinterface(af, &ifs[0]);
+ if (status != PJ_SUCCESS)
+ return status;
+
+ *p_cnt = 1;
+ return PJ_SUCCESS;
+}
+#endif /* SIOCGIFCONF */
+
+/*
+ * Enumerate the local IP interface currently active in the host.
+ */
+PJ_DEF(pj_status_t) pj_enum_ip_interface(int af,
+ unsigned *p_cnt,
+ pj_sockaddr ifs[])
+{
+ unsigned start;
+ pj_status_t status;
+
+ start = 0;
+ if (af==PJ_AF_INET6 || af==PJ_AF_UNSPEC) {
+ unsigned max = *p_cnt;
+ status = if_enum_by_af(PJ_AF_INET6, &max, &ifs[start]);
+ if (status == PJ_SUCCESS) {
+ start += max;
+ (*p_cnt) -= max;
+ }
+ }
+
+ if (af==PJ_AF_INET || af==PJ_AF_UNSPEC) {
+ unsigned max = *p_cnt;
+ status = if_enum_by_af(PJ_AF_INET, &max, &ifs[start]);
+ if (status == PJ_SUCCESS) {
+ start += max;
+ (*p_cnt) -= max;
+ }
+ }
+
+ *p_cnt = start;
+
+ return (*p_cnt != 0) ? PJ_SUCCESS : PJ_ENOTFOUND;
+}
+
+/*
+ * Enumerate the IP routing table for this host.
+ */
+PJ_DEF(pj_status_t) pj_enum_ip_route(unsigned *p_cnt,
+ pj_ip_route_entry routes[])
+{
+ pj_sockaddr itf;
+ pj_status_t status;
+
+ PJ_ASSERT_RETURN(p_cnt && *p_cnt > 0 && routes, PJ_EINVAL);
+
+ pj_bzero(routes, sizeof(routes[0]) * (*p_cnt));
+
+ /* Just get one default route */
+ status = pj_getdefaultipinterface(PJ_AF_INET, &itf);
+ if (status != PJ_SUCCESS)
+ return status;
+
+ routes[0].ipv4.if_addr.s_addr = itf.ipv4.sin_addr.s_addr;
+ routes[0].ipv4.dst_addr.s_addr = 0;
+ routes[0].ipv4.mask.s_addr = 0;
+ *p_cnt = 1;
+
+ return PJ_SUCCESS;
+}
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d027ccc4559342894cf90dacdd73b7fc6aa6e212.svn-base b/jni/pjproject-android/.svn/pristine/d0/d027ccc4559342894cf90dacdd73b7fc6aa6e212.svn-base
new file mode 100644
index 0000000..48f354d
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d027ccc4559342894cf90dacdd73b7fc6aa6e212.svn-base
@@ -0,0 +1,149 @@
+/* $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
+ */
+
+/*
+ * Thanks Zetron, Inc and Phil Torre <ptorre@zetron.com> for donating PJLIB
+ * port to RTEMS.
+ */
+
+/*
+ * Network configuration
+ *
+ ************************************************************
+ * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION *
+ * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! *
+ ************************************************************
+ *
+ */
+
+#ifndef _RTEMS_NETWORKCONFIG_H_
+#define _RTEMS_NETWORKCONFIG_H_
+
+
+#define DEFAULT_IP_ADDRESS_STRING "192.168.0.2"
+#define DEFAULT_NETMASK_STRING "255.255.255.0"
+#define DEFAULT_GATEWAY_STRING "192.168.0.1"
+
+
+
+
+#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
+#warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"
+#define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"
+#endif
+
+#ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
+#warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"
+#define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0
+#endif
+
+#define NETWORK_STACK_PRIORITY 128
+/* #define RTEMS_USE_BOOTP */
+
+/* #define RTEMS_USE_LOOPBACK */
+
+#include <bsp.h>
+
+/*
+ * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the
+ * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not
+ * defined the driver will choose an address.
+ */
+// NOTE: The address below is a dummy address that should only ever
+// be used for testing on a private network. DO NOT LET A PRODUCT
+// CONTAINING THIS ETHERNET ADDRESS OUT INTO THE FIELD!
+//#define RTEMS_SET_ETHERNET_ADDRESS
+#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
+static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
+#endif
+
+#define RTEMS_USE_LOOPBACK
+#ifdef RTEMS_USE_LOOPBACK
+/*
+ * Loopback interface
+ */
+extern int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig* dummy, int unused);
+static struct rtems_bsdnet_ifconfig loopback_config = {
+ "lo0", /* name */
+ rtems_bsdnet_loopattach, /* attach function */
+ NULL, /* link to next interface */
+ "127.0.0.1", /* IP address */
+ "255.0.0.0", /* IP net mask */
+};
+#endif
+
+/*
+ * Default network interface
+ */
+static struct rtems_bsdnet_ifconfig netdriver_config = {
+ RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */
+ RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */
+
+#ifdef RTEMS_USE_LOOPBACK
+ &loopback_config, /* link to next interface */
+#else
+ NULL, /* No more interfaces */
+#endif
+
+#if (defined (RTEMS_USE_BOOTP))
+ NULL, /* BOOTP supplies IP address */
+ NULL, /* BOOTP supplies IP net mask */
+#else
+ "192.168.0.33", /* IP address */
+ "255.255.255.0", /* IP net mask */
+#endif /* !RTEMS_USE_BOOTP */
+
+#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
+ ethernet_address, /* Ethernet hardware address */
+#else
+ NULL, /* Driver supplies hardware address */
+#endif
+ 0 /* Use default driver parameters */
+};
+
+/*
+ * Network configuration
+ */
+struct rtems_bsdnet_config rtems_bsdnet_config = {
+ &netdriver_config,
+
+#if (defined (RTEMS_USE_BOOTP))
+ rtems_bsdnet_do_bootp,
+#else
+ NULL,
+#endif
+
+ NETWORK_STACK_PRIORITY, /* Default network task priority */
+ 1048576, /* Default mbuf capacity */
+ 1048576, /* Default mbuf cluster capacity */
+
+#if (!defined (RTEMS_USE_BOOTP))
+ "testnode", /* Host name */
+ "example.org", /* Domain name */
+ "192.168.6.9", /* Gateway */
+ "192.168.7.41", /* Log host */
+ {"198.137.231.1" }, /* Name server(s) */
+ {"207.202.190.162" }, /* NTP server(s) */
+#endif /* !RTEMS_USE_BOOTP */
+
+};
+
+#endif /* _RTEMS_NETWORKCONFIG_H_ */
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d03a8b196d84cbe86e996b48c0f64da7a67f10c2.svn-base b/jni/pjproject-android/.svn/pristine/d0/d03a8b196d84cbe86e996b48c0f64da7a67f10c2.svn-base
new file mode 100644
index 0000000..01e3e84
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d03a8b196d84cbe86e996b48c0f64da7a67f10c2.svn-base
@@ -0,0 +1,43 @@
+/* $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_CODEC_PJMEDIA_CODEC_H__
+#define __PJMEDIA_CODEC_PJMEDIA_CODEC_H__
+
+/**
+ * @file pjmedia-codec.h
+ * @brief Include all codecs API in PJMEDIA-CODEC
+ */
+
+#include <pjmedia-codec/audio_codecs.h>
+#include <pjmedia-codec/l16.h>
+#include <pjmedia-codec/ffmpeg_vid_codecs.h>
+#include <pjmedia-codec/gsm.h>
+#include <pjmedia-codec/speex.h>
+#include <pjmedia-codec/ilbc.h>
+#include <pjmedia-codec/g722.h>
+#include <pjmedia-codec/g7221.h>
+#include <pjmedia-codec/ipp_codecs.h>
+#include <pjmedia-codec/opencore_amr.h>
+#include <pjmedia-codec/passthrough.h>
+#include <pjmedia-codec/silk.h>
+
+
+#endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d074de11b7d7500006f4798854820c7467b5aeae.svn-base b/jni/pjproject-android/.svn/pristine/d0/d074de11b7d7500006f4798854820c7467b5aeae.svn-base
new file mode 100644
index 0000000..c1ce4ad
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d074de11b7d7500006f4798854820c7467b5aeae.svn-base
@@ -0,0 +1,163 @@
+/* $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/hash.h>
+#include <pj/rand.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include "test.h"
+
+#if INCLUDE_HASH_TEST
+
+#define HASH_COUNT 31
+
+static int hash_test_with_key(pj_pool_t *pool, unsigned char key)
+{
+ pj_hash_table_t *ht;
+ unsigned value = 0x12345;
+ pj_hash_iterator_t it_buf, *it;
+ unsigned *entry;
+
+ ht = pj_hash_create(pool, HASH_COUNT);
+ if (!ht)
+ return -10;
+
+ pj_hash_set(pool, ht, &key, sizeof(key), 0, &value);
+
+ entry = (unsigned*) pj_hash_get(ht, &key, sizeof(key), NULL);
+ if (!entry)
+ return -20;
+
+ if (*entry != value)
+ return -30;
+
+ if (pj_hash_count(ht) != 1)
+ return -30;
+
+ it = pj_hash_first(ht, &it_buf);
+ if (it == NULL)
+ return -40;
+
+ entry = (unsigned*) pj_hash_this(ht, it);
+ if (!entry)
+ return -50;
+
+ if (*entry != value)
+ return -60;
+
+ it = pj_hash_next(ht, it);
+ if (it != NULL)
+ return -70;
+
+ /* Erase item */
+
+ pj_hash_set(NULL, ht, &key, sizeof(key), 0, NULL);
+
+ if (pj_hash_get(ht, &key, sizeof(key), NULL) != NULL)
+ return -80;
+
+ if (pj_hash_count(ht) != 0)
+ return -90;
+
+ it = pj_hash_first(ht, &it_buf);
+ if (it != NULL)
+ return -100;
+
+ return 0;
+}
+
+
+static int hash_collision_test(pj_pool_t *pool)
+{
+ enum {
+ COUNT = HASH_COUNT * 4
+ };
+ pj_hash_table_t *ht;
+ pj_hash_iterator_t it_buf, *it;
+ unsigned char *values;
+ unsigned i;
+
+ ht = pj_hash_create(pool, HASH_COUNT);
+ if (!ht)
+ return -200;
+
+ values = (unsigned char*) pj_pool_alloc(pool, COUNT);
+
+ for (i=0; i<COUNT; ++i) {
+ values[i] = (unsigned char)i;
+ pj_hash_set(pool, ht, &i, sizeof(i), 0, &values[i]);
+ }
+
+ if (pj_hash_count(ht) != COUNT)
+ return -210;
+
+ for (i=0; i<COUNT; ++i) {
+ unsigned char *entry;
+ entry = (unsigned char*) pj_hash_get(ht, &i, sizeof(i), NULL);
+ if (!entry)
+ return -220;
+ if (*entry != values[i])
+ return -230;
+ }
+
+ i = 0;
+ it = pj_hash_first(ht, &it_buf);
+ while (it) {
+ ++i;
+ it = pj_hash_next(ht, it);
+ }
+
+ if (i != COUNT)
+ return -240;
+
+ return 0;
+}
+
+
+/*
+ * Hash table test.
+ */
+int hash_test(void)
+{
+ pj_pool_t *pool = pj_pool_create(mem, "hash", 512, 512, NULL);
+ int rc;
+ unsigned i;
+
+ /* Test to fill in each row in the table */
+ for (i=0; i<=HASH_COUNT; ++i) {
+ rc = hash_test_with_key(pool, (unsigned char)i);
+ if (rc != 0) {
+ pj_pool_release(pool);
+ return rc;
+ }
+ }
+
+ /* Collision test */
+ rc = hash_collision_test(pool);
+ if (rc != 0) {
+ pj_pool_release(pool);
+ return rc;
+ }
+
+ pj_pool_release(pool);
+ return 0;
+}
+
+#endif /* INCLUDE_HASH_TEST */
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d08050298fd0cb62b9faef68e6d687e866afd81f.svn-base b/jni/pjproject-android/.svn/pristine/d0/d08050298fd0cb62b9faef68e6d687e866afd81f.svn-base
new file mode 100644
index 0000000..ef89e6b
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d08050298fd0cb62b9faef68e6d687e866afd81f.svn-base
@@ -0,0 +1,124 @@
+/* $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 "pjsua_app.h"
+
+#define THIS_FILE "main.c"
+
+static pj_bool_t running = PJ_TRUE;
+static pj_status_t receive_end_sig;
+static pj_thread_t *sig_thread;
+static pjsua_app_cfg_t cfg;
+
+/* Called when CLI (re)started */
+void on_app_started(pj_status_t status, const char *msg)
+{
+ pj_perror(3, THIS_FILE, status, (msg)?msg:"");
+}
+
+void on_app_stopped(pj_bool_t restart, int argc, char** argv)
+{
+ if (argv) {
+ cfg.argc = argc;
+ cfg.argv = argv;
+ }
+
+ running = restart;
+}
+
+#if defined(PJ_WIN32) && PJ_WIN32!=0
+#include <windows.h>
+
+static pj_thread_desc handler_desc;
+
+static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
+{
+ switch (fdwCtrlType)
+ {
+ // Handle the CTRL+C signal.
+
+ case CTRL_C_EVENT:
+ case CTRL_CLOSE_EVENT:
+ case CTRL_BREAK_EVENT:
+ case CTRL_LOGOFF_EVENT:
+ case CTRL_SHUTDOWN_EVENT:
+ pj_thread_register("ctrlhandler", handler_desc, &sig_thread);
+ PJ_LOG(3,(THIS_FILE, "Ctrl-C detected, quitting.."));
+ receive_end_sig = PJ_TRUE;
+ pjsua_app_destroy();
+ ExitProcess(1);
+ PJ_UNREACHED(return TRUE;)
+
+ default:
+
+ return FALSE;
+ }
+}
+
+static void setup_socket_signal()
+{
+}
+
+static void setup_signal_handler(void)
+{
+ SetConsoleCtrlHandler(&CtrlHandler, TRUE);
+}
+
+#else
+#include <signal.h>
+
+static void setup_socket_signal()
+{
+ signal(SIGPIPE, SIG_IGN);
+}
+
+static void setup_signal_handler(void) {}
+#endif
+
+int main(int argc, char *argv[])
+{
+ pj_status_t status = PJ_TRUE;
+
+ pj_bzero(&cfg, sizeof(cfg));
+ cfg.on_started = &on_app_started;
+ cfg.on_stopped = &on_app_stopped;
+ cfg.argc = argc;
+ cfg.argv = argv;
+
+ setup_signal_handler();
+ setup_socket_signal();
+
+ while (running) {
+ status = pjsua_app_init(&cfg);
+ if (status == PJ_SUCCESS) {
+ status = pjsua_app_run(PJ_TRUE);
+ } else {
+ running = PJ_FALSE;
+ }
+
+ if (!receive_end_sig) {
+ pjsua_app_destroy();
+
+ /* This is on purpose */
+ pjsua_app_destroy();
+ } else {
+ pj_thread_join(sig_thread);
+ }
+ }
+}
diff --git a/jni/pjproject-android/.svn/pristine/d0/d0859dc453c18f1ac49c1ab4f45a7f51004ec514.svn-base b/jni/pjproject-android/.svn/pristine/d0/d0859dc453c18f1ac49c1ab4f45a7f51004ec514.svn-base
new file mode 100644
index 0000000..766cf8f
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d0859dc453c18f1ac49c1ab4f45a7f51004ec514.svn-base
@@ -0,0 +1,386 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<?codewarrior exportversion="1.0" ideversion="5.5" success="y" ?>
+
+<!DOCTYPE MWIDEWORKSPACE [
+<!ELEMENT MWIDEWORKSPACE (WINDOW*, COMWINDOW*)>
+<!ELEMENT WINDOW (SESSION, EDOCTYPE, PATH, FRAMELOC, FRAMESIZE, DOCKINFO)>
+<!ELEMENT COMWINDOW (SESSION, CLSID, OWNERPROJECT, DATA, FRAMELOC, FRAMESIZE, DOCKINFO)>
+<!ELEMENT SESSION (#PCDATA)>
+<!ELEMENT EDOCTYPE (#PCDATA)>
+<!ELEMENT DEFAULT (#PCDATA)>
+<!ELEMENT MAXIMIZED (#PCDATA)>
+<!ELEMENT PATH (#PCDATA)>
+<!ATTLIST PATH USERELATIVEPATHS (true | false) "true">
+<!ELEMENT FRAMELOC (X, Y)>
+<!ELEMENT X (#PCDATA)>
+<!ELEMENT Y (#PCDATA)>
+<!ELEMENT FRAMESIZE (W, H)>
+<!ELEMENT W (#PCDATA)>
+<!ELEMENT H (#PCDATA)>
+<!ELEMENT DOCKINFO (STATUS, ROW, COLUMN, DOCKBARID, PCTWIDTH, HGT, GROUPID)>
+<!ELEMENT STATUS (#PCDATA)>
+<!ELEMENT ROW (#PCDATA)>
+<!ELEMENT COLUMN (#PCDATA)>
+<!ELEMENT DOCKBARID (#PCDATA)>
+<!ELEMENT PCTWIDTH (#PCDATA)>
+<!ELEMENT HGT (#PCDATA)>
+<!ELEMENT GROUPID (GIDHIGHPART, GIDLOWPART)>
+<!ELEMENT GIDHIGHPART (#PCDATA)>
+<!ELEMENT GIDLOWPART (#PCDATA)>
+<!ELEMENT CLSID (#PCDATA)>
+<!ELEMENT OWNERPROJECT (#PCDATA)>
+<!ATTLIST OWNERPROJECT USERELATIVEPATHS (true | false) "true">
+<!ELEMENT DATA (#PCDATA)>
+<!ATTLIST DATA BINARYFORMAT (true | false) "true">
+]>
+
+<MWIDEWORKSPACE>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <DEFAULT>true</DEFAULT>
+ <PATH USERELATIVEPATHS = "true">pjlib.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">pjlib_util.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">pjnath.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">null_audio.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">pjsdp.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">pjmedia.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">pjsip.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">pjsip_simple.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">pjsip_ua.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">pjsua_lib.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-1</SESSION>
+ <EDOCTYPE>0</EDOCTYPE>
+ <PATH USERELATIVEPATHS = "true">symbian_ua.mcp</PATH>
+ <FRAMELOC>
+ <X>0</X>
+ <Y>0</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>347</W>
+ <H>128</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>1</STATUS>
+ <ROW>0</ROW>
+ <COLUMN>0</COLUMN>
+ <DOCKBARID>59420</DOCKBARID>
+ <PCTWIDTH>1.000000</PCTWIDTH>
+ <HGT>350</HGT>
+ <GROUPID>
+ <GIDHIGHPART>4294967294</GIDHIGHPART>
+ <GIDLOWPART>4294967294</GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-2147483648</SESSION>
+ <EDOCTYPE>20</EDOCTYPE>
+ <FRAMELOC>
+ <X>4</X>
+ <Y>23</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>1464</W>
+ <H>3681</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>0</STATUS>
+ <ROW></ROW>
+ <COLUMN></COLUMN>
+ <DOCKBARID></DOCKBARID>
+ <PCTWIDTH></PCTWIDTH>
+ <HGT></HGT>
+ <GROUPID>
+ <GIDHIGHPART></GIDHIGHPART>
+ <GIDLOWPART></GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-2147483648</SESSION>
+ <EDOCTYPE>36</EDOCTYPE>
+ <FRAMELOC>
+ <X>4</X>
+ <Y>23</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>366</W>
+ <H>354</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>0</STATUS>
+ <ROW></ROW>
+ <COLUMN></COLUMN>
+ <DOCKBARID></DOCKBARID>
+ <PCTWIDTH></PCTWIDTH>
+ <HGT></HGT>
+ <GROUPID>
+ <GIDHIGHPART></GIDHIGHPART>
+ <GIDLOWPART></GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+ <WINDOW>
+ <SESSION>-2147483648</SESSION>
+ <EDOCTYPE>23</EDOCTYPE>
+ <FRAMELOC>
+ <X>6</X>
+ <Y>81</Y>
+ </FRAMELOC>
+ <FRAMESIZE>
+ <W>566</W>
+ <H>477</H>
+ </FRAMESIZE>
+ <DOCKINFO>
+ <STATUS>0</STATUS>
+ <ROW></ROW>
+ <COLUMN></COLUMN>
+ <DOCKBARID></DOCKBARID>
+ <PCTWIDTH></PCTWIDTH>
+ <HGT></HGT>
+ <GROUPID>
+ <GIDHIGHPART></GIDHIGHPART>
+ <GIDLOWPART></GIDLOWPART>
+ </GROUPID>
+ </DOCKINFO>
+ </WINDOW>
+</MWIDEWORKSPACE>
diff --git a/jni/pjproject-android/.svn/pristine/d0/d0bd3ec8dc79f8b02c1a0d77711e160a7dd414fe.svn-base b/jni/pjproject-android/.svn/pristine/d0/d0bd3ec8dc79f8b02c1a0d77711e160a7dd414fe.svn-base
new file mode 100644
index 0000000..7718f65
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d0bd3ec8dc79f8b02c1a0d77711e160a7dd414fe.svn-base
@@ -0,0 +1,60 @@
+/* $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/unicode.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+#include <windows.h>
+
+
+PJ_DEF(wchar_t*) pj_ansi_to_unicode(const char *s, int len,
+ wchar_t *buf, int buf_count)
+{
+ PJ_ASSERT_RETURN(s && buf, NULL);
+
+ len = MultiByteToWideChar(CP_ACP, 0, s, len,
+ buf, buf_count);
+ if (buf_count) {
+ if (len < buf_count)
+ buf[len] = 0;
+ else
+ buf[len-1] = 0;
+ }
+
+ return buf;
+}
+
+
+PJ_DEF(char*) pj_unicode_to_ansi( const wchar_t *wstr, pj_ssize_t len,
+ char *buf, int buf_size)
+{
+ PJ_ASSERT_RETURN(wstr && buf, NULL);
+
+ len = WideCharToMultiByte(CP_ACP, 0, wstr, (int)len, buf, buf_size,
+ NULL, NULL);
+ if (buf_size) {
+ if (len < buf_size)
+ buf[len] = '\0';
+ else
+ buf[len-1] = '\0';
+ }
+
+ return buf;
+}
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d0bd82d4ac18c329414a89a400d6494da2f75c7e.svn-base b/jni/pjproject-android/.svn/pristine/d0/d0bd82d4ac18c329414a89a400d6494da2f75c7e.svn-base
new file mode 100644
index 0000000..92b0ff4
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d0bd82d4ac18c329414a89a400d6494da2f75c7e.svn-base
@@ -0,0 +1,11 @@
+# $Id$
+#
+from inc_cfg import *
+
+test_param= TestParam(
+ "Callee=no SRTP, caller=optional SRTP",
+ [
+ InstanceParam("callee", "--null-audio --max-calls=1"),
+ InstanceParam("caller", "--null-audio --use-srtp=1 --srtp-secure=0 --max-calls=1")
+ ]
+ )
diff --git a/jni/pjproject-android/.svn/pristine/d0/d0beb63f5dd57ef7adb2b2298027bad5876dcac6.svn-base b/jni/pjproject-android/.svn/pristine/d0/d0beb63f5dd57ef7adb2b2298027bad5876dcac6.svn-base
new file mode 100644
index 0000000..67e0132
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d0beb63f5dd57ef7adb2b2298027bad5876dcac6.svn-base
@@ -0,0 +1,28 @@
+# $Id$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Video uses static payload type which will cause failure
+# when session.c looks-up the codec in codec manager
+sdp = \
+"""
+v=0
+o=- 0 0 IN IP4 127.0.0.1
+s=-
+c=IN IP4 127.0.0.1
+t=0 0
+m=video 4000 RTP/AVP 54
+m=audio 5000 RTP/AVP 0
+"""
+
+pjsua_args = "--null-audio --auto-answer 200"
+extra_headers = ""
+include = ["Content-Type: application/sdp", # response must include SDP
+ "m=video 0 RTP/AVP[\\s\\S]+m=audio [1-9]+[0-9]* RTP/AVP"
+ ]
+exclude = []
+
+sendto_cfg = sip.SendtoCfg("Mixed audio and video", pjsua_args, sdp, 200,
+ extra_headers=extra_headers,
+ resp_inc=include, resp_exc=exclude)
+
diff --git a/jni/pjproject-android/.svn/pristine/d0/d0f332a886e25ebfce6ef31767b91ed9878fc4f6.svn-base b/jni/pjproject-android/.svn/pristine/d0/d0f332a886e25ebfce6ef31767b91ed9878fc4f6.svn-base
new file mode 100644
index 0000000..4c8ca6f
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/d0/d0f332a886e25ebfce6ef31767b91ed9878fc4f6.svn-base
Binary files differ